commit: 791a51020454b44770aa60144e26669e88012a50 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> AuthorDate: Sun Mar 14 01:18:20 2021 +0000 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> CommitDate: Sun Mar 14 23:01:53 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=791a5102
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 <AT> gentoo.org> .../files/menu-cache-1.1.0-memleak.patch | 37 ++++++++++++++++++++++ lxde-base/menu-cache/menu-cache-1.1.0-r1.ebuild | 37 ++++++++++++++++++++++ 2 files changed, 74 insertions(+) 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 00000000000..faa91fff3e9 --- /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.k...@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 00000000000..a7684ccc41d --- /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 +}