summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2024-07-28 05:48:39 +0100
committerSam James <sam@gentoo.org>2024-07-28 05:48:39 +0100
commit4b32696a00abf08b3734ed3355aeb382c917c5f3 (patch)
tree2ee7115ddad2e8b4a6a2b9876846fef989eb4433 /x11-misc/pcmanfm
parentdev-qt/qtwebengine: fix build with GCC 15 (qt5) (diff)
downloadgentoo-4b32696a00abf08b3734ed3355aeb382c917c5f3.tar.gz
gentoo-4b32696a00abf08b3734ed3355aeb382c917c5f3.tar.bz2
gentoo-4b32696a00abf08b3734ed3355aeb382c917c5f3.zip
x11-misc/pcmanfm: fix modern C issues
Closes: https://bugs.gentoo.org/919077 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'x11-misc/pcmanfm')
-rw-r--r--x11-misc/pcmanfm/files/pcmanfm-1.3.2-c99.patch31
-rw-r--r--x11-misc/pcmanfm/pcmanfm-1.3.2-r2.ebuild62
2 files changed, 93 insertions, 0 deletions
diff --git a/x11-misc/pcmanfm/files/pcmanfm-1.3.2-c99.patch b/x11-misc/pcmanfm/files/pcmanfm-1.3.2-c99.patch
new file mode 100644
index 000000000000..52337891d5d6
--- /dev/null
+++ b/x11-misc/pcmanfm/files/pcmanfm-1.3.2-c99.patch
@@ -0,0 +1,31 @@
+https://bugs.gentoo.org/919077
+https://github.com/lxde/pcmanfm/pull/17
+
+From 9bf5145eba45cd5e3b87d4f040618fe0ea69a81d Mon Sep 17 00:00:00 2001
+From: Mamoru TASAKA <mtasaka@fedoraproject.org>
+Date: Fri, 26 Jul 2024 12:13:32 +0900
+Subject: [PATCH] Fix build with gcc14 -Werror=incompatible-pointer-types
+
+gcc14 now defaults to gcc -Werror=incompatible-pointer-types .
+This commit adds required casts to different pointer types.
+--- a/src/desktop.c
++++ b/src/desktop.c
+@@ -1267,7 +1267,7 @@ static AtkObject *fm_desktop_accessible_ref_selection(AtkSelection *selection,
+ item = items->data;
+ if (item->item->is_selected)
+ if (i-- == 0)
+- return g_object_ref(item);
++ return (AtkObject *)g_object_ref(item);
+ }
+ return NULL;
+ }
+@@ -1454,7 +1454,7 @@ static AtkObject *fm_desktop_accessible_ref_child(AtkObject *accessible,
+ item = g_list_nth_data(priv->items, index);
+ if (!item)
+ return NULL;
+- return g_object_ref(item);
++ return (AtkObject *)g_object_ref(item);
+ }
+
+ static void fm_desktop_accessible_initialize(AtkObject *accessible, gpointer data)
+
diff --git a/x11-misc/pcmanfm/pcmanfm-1.3.2-r2.ebuild b/x11-misc/pcmanfm/pcmanfm-1.3.2-r2.ebuild
new file mode 100644
index 000000000000..27188a32160d
--- /dev/null
+++ b/x11-misc/pcmanfm/pcmanfm-1.3.2-r2.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+MY_P="${PN}-${PV/_/}"
+inherit xdg readme.gentoo-r1
+
+DESCRIPTION="Fast lightweight tabbed filemanager"
+HOMEPAGE="https://github.com/lxde/pcmanfm"
+SRC_URI="https://downloads.sourceforge.net/${PN}/${P}.tar.xz"
+S="${WORKDIR}"/${MY_P}
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~riscv ~x86"
+IUSE="debug"
+
+RDEPEND="
+ dev-libs/atk
+ >=dev-libs/glib-2.18:2
+ >=lxde-base/menu-cache-1.1.0-r1
+ sys-apps/util-linux
+ virtual/freedesktop-icon-theme
+ x11-libs/cairo
+ x11-libs/gdk-pixbuf:2
+ x11-libs/gtk+:3
+ >=x11-libs/libfm-${PV}:=[gtk]
+ x11-libs/libX11
+ x11-libs/pango
+ x11-misc/shared-mime-info
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ >=dev-util/intltool-0.40
+ sys-devel/gettext
+ virtual/pkgconfig
+"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.3.2-c99.patch
+)
+
+src_configure() {
+ econf \
+ --sysconfdir="${EPREFIX}"/etc \
+ --with-gtk=3 \
+ $(use_enable debug)
+}
+
+src_install() {
+ default
+
+ local DOC_CONTENTS="PCmanFM can optionally support the menu://applications/
+ location. You should install lxde-base/lxmenu-data for that functionality."
+ readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+ xdg_pkg_postinst
+ readme.gentoo_print_elog
+}