summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2021-03-14 02:18:20 +0100
committerAndreas Sturmlechner <asturm@gentoo.org>2021-03-15 00:01:53 +0100
commit791a51020454b44770aa60144e26669e88012a50 (patch)
treeb5f58d6329928e906adc6808db0121a825719059 /lxde-base/menu-cache
parentsci-libs/libint: fix install of static libs (bug #776256) (diff)
downloadgentoo-791a51020454b44770aa60144e26669e88012a50.tar.gz
gentoo-791a51020454b44770aa60144e26669e88012a50.tar.bz2
gentoo-791a51020454b44770aa60144e26669e88012a50.zip
lxde-base/menu-cache: EAPI-7 bump, fix memleak, cleanup .la
Package-Manager: Portage-3.0.17, Repoman-3.0.2 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'lxde-base/menu-cache')
-rw-r--r--lxde-base/menu-cache/files/menu-cache-1.1.0-memleak.patch37
-rw-r--r--lxde-base/menu-cache/menu-cache-1.1.0-r1.ebuild37
2 files changed, 74 insertions, 0 deletions
diff --git a/lxde-base/menu-cache/files/menu-cache-1.1.0-memleak.patch b/lxde-base/menu-cache/files/menu-cache-1.1.0-memleak.patch
new file mode 100644
index 000000000000..faa91fff3e92
--- /dev/null
+++ b/lxde-base/menu-cache/files/menu-cache-1.1.0-memleak.patch
@@ -0,0 +1,37 @@
+From 97e5de8682c0c44fe4e6a2df864c5fdf76cd77cc Mon Sep 17 00:00:00 2001
+From: Palo Kisa <palo.kisa@gmail.com>
+Date: Thu, 30 Nov 2017 11:36:18 +0100
+Subject: [PATCH] libmenu-cache: Fix memory leaks
+
+---
+ libmenu-cache/menu-cache.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/libmenu-cache/menu-cache.c b/libmenu-cache/menu-cache.c
+index 5025d72..273b503 100644
+--- a/libmenu-cache/menu-cache.c
++++ b/libmenu-cache/menu-cache.c
+@@ -379,11 +379,15 @@ static MenuCacheItem* read_item(GDataInputStream* f, MenuCache* cache,
+ else /* separator */
+ {
+ item->type = MENU_CACHE_TYPE_SEP;
++ g_free(line);
+ return item;
+ }
+ }
+ else
++ {
++ g_free(line);
+ return NULL;
++ }
+
+ item->id = g_strndup( line + 1, len - 1 );
+ g_free(line);
+@@ -923,6 +927,7 @@ gboolean menu_cache_item_unref(MenuCacheItem* item)
+ else
+ {
+ MenuCacheApp* app = MENU_CACHE_APP(item);
++ g_free(app->generic_name);
+ g_free( app->exec );
+ g_free(app->try_exec);
+ g_free(app->working_dir);
diff --git a/lxde-base/menu-cache/menu-cache-1.1.0-r1.ebuild b/lxde-base/menu-cache/menu-cache-1.1.0-r1.ebuild
new file mode 100644
index 000000000000..a7684ccc41df
--- /dev/null
+++ b/lxde-base/menu-cache/menu-cache-1.1.0-r1.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+DESCRIPTION="Library to create and utilize caches to speed up freedesktop application menus"
+HOMEPAGE="https://lxde.org/"
+SRC_URI="mirror://sourceforge/lxde/${P}.tar.xz"
+
+LICENSE="LGPL-2.1+"
+SLOT="0/2" # ABI is v2. See Makefile.am
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~mips ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux"
+IUSE=""
+
+RDEPEND="
+ dev-libs/glib:2
+ x11-libs/libfm-extra
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ sys-devel/gettext
+ virtual/pkgconfig
+"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-fno-common.diff # upstream PR#19
+ "${FILESDIR}"/${P}-memleak.patch # git master
+)
+
+src_configure() {
+ econf --disable-static
+}
+
+src_install() {
+ default
+ find "${ED}" -name '*.la' -delete || die
+}