public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: x11-libs/libfm/, x11-libs/libfm/files/
@ 2021-03-15  9:19 Andreas Sturmlechner
  0 siblings, 0 replies; 2+ messages in thread
From: Andreas Sturmlechner @ 2021-03-15  9:19 UTC (permalink / raw
  To: gentoo-commits

commit:     8d52689c247f76d82966152f4c8d383beaf793c1
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sun Mar 14 01:19:08 2021 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Mon Mar 15 09:18:00 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8d52689c

x11-libs/libfm: 1.3.2 version bump, switch to GTK3, fix xdg

simplify src_prepare, use heredoc and get rid of seds
add missing || die

Package-Manager: Portage-3.0.17, Repoman-3.0.2
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 x11-libs/libfm/Manifest                            |   1 +
 x11-libs/libfm/files/libfm-1.3.2-buildsystem.patch |  34 ++++++
 x11-libs/libfm/libfm-1.3.2.ebuild                  | 124 +++++++++++++++++++++
 3 files changed, 159 insertions(+)

diff --git a/x11-libs/libfm/Manifest b/x11-libs/libfm/Manifest
index 0aa1137e43b..0b5c4fa34f2 100644
--- a/x11-libs/libfm/Manifest
+++ b/x11-libs/libfm/Manifest
@@ -1 +1,2 @@
 DIST libfm-1.3.1.tar.gz 1290374 BLAKE2B 3df27fc6b4afd089e51cd36db0f764e9359b0c6373e0ff484aa7cd2ee99170530fb60f5757ade9263a5bdd1d6be9917debb66a19cc8e13c505431050b6f3a901 SHA512 82bbcb1b9c7d4543bcb075906bdc1554462b041ad936e2f0334ae478302b19808cdbfe6d0c86a039bbd72a2491f2d2ada61a324fe3933a8dde16a03d93bef2bc
+DIST libfm-1.3.2.tar.gz 1295152 BLAKE2B 80b2110610aac9e8cb37502c3e69e425256ff22565ba15b5806e30c3bed5ad141c38cac1eda91f846e14eca6b783bea3d715b3b467ae7d37b036e3f19cadc3f8 SHA512 905c5eca66e1acb8ab2ed20de9f10e43d38eae304d1d986dd9961469141f9156130602c060754a5161672208c37a3969489bb40fd9c941281817852ca38500a6

diff --git a/x11-libs/libfm/files/libfm-1.3.2-buildsystem.patch b/x11-libs/libfm/files/libfm-1.3.2-buildsystem.patch
new file mode 100644
index 00000000000..3b5f2b5061e
--- /dev/null
+++ b/x11-libs/libfm/files/libfm-1.3.2-buildsystem.patch
@@ -0,0 +1,34 @@
+From 5db9cb19a2b33c89255b8d483f42d5fc647df2c9 Mon Sep 17 00:00:00 2001
+From: Andreas Sturmlechner <asturm@gentoo.org>
+Date: Mon, 15 Mar 2021 01:20:02 +0100
+Subject: [PATCH] Drop -Werror and unwanted CPPFLAGS
+
+---
+ configure.ac | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index bf6b07f..181eed7 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -3,7 +3,7 @@
+ 
+ AC_PREREQ([2.63])
+ AC_INIT([libfm], [1.3.2], [http://pcmanfm.sourceforge.net/])
+-AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects no-dist-gzip dist-xz -Wno-portability])
++AM_INIT_AUTOMAKE([-Wall foreign subdir-objects no-dist-gzip dist-xz -Wno-portability])
+ AC_CONFIG_MACRO_DIR(m4)
+ AC_CONFIG_HEADERS([config.h])
+ 
+@@ -277,7 +277,7 @@ AC_ARG_ENABLE(debug,
+ )
+ if test "$enable_debug" = "yes"; then
+     # turn on debug and disable optimization
+-    CPPFLAGS="$CPPFLAGS -DG_ENABLE_DEBUG -O0 -g"
++    CPPFLAGS="$CPPFLAGS -DG_ENABLE_DEBUG"
+     case "$CC" in
+     gcc*)
+         CPPFLAGS="$CPPFLAGS -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers"
+-- 
+2.30.2
+

diff --git a/x11-libs/libfm/libfm-1.3.2.ebuild b/x11-libs/libfm/libfm-1.3.2.ebuild
new file mode 100644
index 00000000000..8bb9a86de8f
--- /dev/null
+++ b/x11-libs/libfm/libfm-1.3.2.ebuild
@@ -0,0 +1,124 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+MY_P="${PN}-${PV/_/}"
+inherit autotools vala xdg
+
+DESCRIPTION="Library for file management"
+HOMEPAGE="https://wiki.lxde.org/en/PCManFM"
+SRC_URI="https://github.com/lxde/libfm/archive/${PV}.tar.gz -> ${MY_P}.tar.gz"
+S="${WORKDIR}"/${MY_P}
+
+LICENSE="GPL-2"
+SLOT="0/5.3.1" # copy ABI_VERSION because it seems upstream change it randomly
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~mips ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="+automount debug doc examples exif gtk udisks vala"
+
+REQUIRED_USE="udisks? ( automount ) doc? ( gtk )"
+
+DEPEND="
+	>=dev-libs/glib-2.18:2
+	>=lxde-base/menu-cache-1.1.0-r1:=
+	~x11-libs/libfm-extra-${PV}
+	gtk? ( x11-libs/gtk+:3 )
+	udisks? ( dev-libs/dbus-glib )
+"
+RDEPEND="${DEPEND}
+	!lxde-base/lxshortcut
+	x11-misc/shared-mime-info
+	automount? (
+		udisks? ( gnome-base/gvfs[udev,udisks] )
+		!udisks? ( gnome-base/gvfs[udev] )
+	)
+	exif? ( media-libs/libexif )
+"
+BDEPEND="
+	app-arch/xz-utils
+	dev-util/glib-utils
+	>=dev-util/intltool-0.40
+	sys-devel/gettext
+	virtual/pkgconfig
+	doc? ( dev-util/gtk-doc )
+	vala? ( $(vala_depend) )
+"
+
+PATCHES=( "${FILESDIR}/${P}-buildsystem.patch" )
+
+src_prepare() {
+	xdg_src_prepare
+
+	if ! use doc; then
+		sed -ie '/^SUBDIR.*=/s#docs##' Makefile.am || die
+		sed -ie '/^[[:space:]]*docs/d' configure.ac || die
+	fi
+
+	# disable unused translations. Bug #356029
+	cat <<-EOF >> po/POTFILES.in || die
+data/ui/app-chooser.ui
+data/ui/ask-rename.ui
+data/ui/exec-file.ui
+data/ui/file-prop.ui
+data/ui/preferred-apps.ui
+data/ui/progress.ui
+EOF
+
+	# subslot sanity check
+	local sub_slot=${SLOT#*/}
+	local libfm_major_abi=$(sed -rne '/ABI_VERSION/s:.*=::p' src/Makefile.am | tr ':' '.')
+
+	if [[ ${sub_slot} != ${libfm_major_abi} ]]; then
+		eerror "Ebuild sub-slot (${sub_slot}) does not match ABI_VERSION(${libfm_major_abi})"
+		eerror "Please update SLOT variable as follows:"
+		eerror "    SLOT=\"${SLOT%%/*}/${libfm_major_abi}\""
+		eerror
+		die "sub-slot sanity check failed"
+	fi
+
+	eautoreconf
+	rm -r autom4te.cache || die
+	use vala && export VALAC="$(type -p valac-$(vala_best_api_version))"
+}
+
+src_configure() {
+	local myeconfargs=(
+		--disable-static
+		--with-html-dir=/usr/share/doc/${PF}/html
+		$(use_enable debug)
+		$(use_enable doc gtk-doc)
+		$(use_enable examples demo)
+		$(use_enable exif)
+		$(use_with gtk gtk 3)
+		$(use_enable udisks)
+		$(use_enable vala old-actions)
+	)
+	econf "${myeconfargs[@]}"
+}
+
+src_install() {
+	default
+	find "${ED}" -name '*.la' -delete || die
+	# Sometimes a directory is created instead of a symlink. No idea why...
+	# It is wrong anyway. We expect a libfm-1.0 directory and then a libfm
+	# symlink to it.
+	if [[ -h ${D}/usr/include/${PN} || -d ${D}/usr/include/${PN} ]]; then
+		rm -r "${D}"/usr/include/${PN} || die
+	fi
+	# Remove files installed by split-off libfm-extra package
+	rm "${D}"/usr/include/libfm-1.0/fm-{extra,version,xml-file}.h || die
+	rm "${D}"/usr/$(get_libdir)/libfm-extra* || die
+	rm "${D}"/usr/$(get_libdir)/pkgconfig/libfm-extra.pc || die
+}
+
+pkg_preinst() {
+	xdg_pkg_preinst
+	# Resolve the symlink mess. Bug #439570
+	if [[ -d "${ROOT}"/usr/include/${PN} ]]; then
+		rm -rf "${ROOT}"/usr/include/${PN} || die
+	fi
+	if [[ -d "${D}"/usr/include/${PN}-1.0 ]]; then
+		cd "${D}"/usr/include || die
+		ln -s --force ${PN}-1.0 ${PN} || die
+	fi
+}


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: x11-libs/libfm/, x11-libs/libfm/files/
@ 2024-03-17  3:20 Sam James
  0 siblings, 0 replies; 2+ messages in thread
From: Sam James @ 2024-03-17  3:20 UTC (permalink / raw
  To: gentoo-commits

commit:     1042734eac3ec936bf9fcd987f1c1e56cdf327c9
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Mar 17 03:17:52 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Mar 17 03:17:52 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1042734e

x11-libs/libfm: fix modern C issue

Closes: https://bugs.gentoo.org/919076
Signed-off-by: Sam James <sam <AT> gentoo.org>

 x11-libs/libfm/files/libfm-1.3.2-c99.patch |  48 +++++++++++
 x11-libs/libfm/libfm-1.3.2-r1.ebuild       | 127 +++++++++++++++++++++++++++++
 2 files changed, 175 insertions(+)

diff --git a/x11-libs/libfm/files/libfm-1.3.2-c99.patch b/x11-libs/libfm/files/libfm-1.3.2-c99.patch
new file mode 100644
index 000000000000..b84cf01111c8
--- /dev/null
+++ b/x11-libs/libfm/files/libfm-1.3.2-c99.patch
@@ -0,0 +1,48 @@
+https://bugs.gentoo.org/919076
+https://github.com/lxde/libfm/issues/100
+https://github.com/lxde/libfm/pull/101
+
+From ec6a21263d150aea918826941a80f335b45470a8 Mon Sep 17 00:00:00 2001
+From: Mamoru TASAKA <mtasaka@fedoraproject.org>
+Date: Fri, 1 Mar 2024 14:19:46 +0900
+Subject: [PATCH] FIX: support gcc14 -Werror=incompatible-pointer-types
+
+gcc14 now defaults to -Werror=incompatible-pointer-types .
+To support this, cast GTK related objects for assignment
+properly.
+
+Fixes #100 .
+--- a/src/gtk/exo/exo-icon-view.c
++++ b/src/gtk/exo/exo-icon-view.c
+@@ -2819,7 +2819,7 @@ exo_icon_view_key_press_event (GtkWidget   *widget,
+   /* allocate a new event to forward */
+   new_event = gdk_event_copy ((GdkEvent *) event);
+   g_object_unref (G_OBJECT (new_event->key.window));
+-  new_event->key.window = g_object_ref (G_OBJECT (gtk_widget_get_window (icon_view->priv->search_entry)));
++  new_event->key.window = GDK_WINDOW(g_object_ref (G_OBJECT (gtk_widget_get_window (icon_view->priv->search_entry))));
+ 
+   /* send the event to the search entry. If the "preedit-changed" signal is
+    * emitted during this event, priv->search_imcontext_changed will be set.
+--- a/src/gtk/fm-dnd-dest.c
++++ b/src/gtk/fm-dnd-dest.c
+@@ -458,7 +458,7 @@ static GdkDragAction _ask_action_on_drop(GtkWidget *widget,
+             gtk_action_set_sensitive(act, FALSE);
+         }
+     }
+-    ri.menu = g_object_ref(gtk_ui_manager_get_widget(ui, "/popup"));
++    ri.menu = GTK_MENU(g_object_ref(gtk_ui_manager_get_widget(ui, "/popup")));
+     g_signal_connect(ri.menu, "selection-done", G_CALLBACK(gtk_widget_destroy), NULL);
+     unmap_handler = g_signal_connect(ri.menu, "unmap",
+                                      G_CALLBACK(run_unmap_handler), &ri);
+--- a/src/gtk/fm-standard-view.c
++++ b/src/gtk/fm-standard-view.c
+@@ -637,7 +637,7 @@ static inline void create_icon_view(FmStandardView* fv, GList* sels)
+                                 "text", FM_FOLDER_MODEL_COL_NAME );
+     if(fv->renderer_text)
+         g_object_unref(fv->renderer_text);
+-    fv->renderer_text = g_object_ref_sink(render);
++    fv->renderer_text = FM_CELL_RENDERER_TEXT(g_object_ref_sink(render));
+     exo_icon_view_set_search_column((ExoIconView*)fv->view, FM_FOLDER_MODEL_COL_NAME);
+     g_signal_connect(fv->view, "item-activated", G_CALLBACK(on_icon_view_item_activated), fv);
+     g_signal_connect(fv->view, "selection-changed", G_CALLBACK(on_sel_changed), fv);
+

diff --git a/x11-libs/libfm/libfm-1.3.2-r1.ebuild b/x11-libs/libfm/libfm-1.3.2-r1.ebuild
new file mode 100644
index 000000000000..63012f59c6ff
--- /dev/null
+++ b/x11-libs/libfm/libfm-1.3.2-r1.ebuild
@@ -0,0 +1,127 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+MY_P="${PN}-${PV/_/}"
+inherit autotools vala xdg
+
+DESCRIPTION="Library for file management"
+HOMEPAGE="https://wiki.lxde.org/en/PCManFM"
+SRC_URI="https://github.com/lxde/libfm/archive/${PV}.tar.gz -> ${MY_P}.tar.gz"
+S="${WORKDIR}"/${MY_P}
+
+LICENSE="GPL-2"
+SLOT="0/5.3.1" # copy ABI_VERSION because it seems upstream change it randomly
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~x86 ~amd64-linux ~x86-linux"
+IUSE="+automount debug doc examples exif gtk udisks vala"
+
+REQUIRED_USE="udisks? ( automount ) doc? ( gtk )"
+
+DEPEND="
+	>=dev-libs/glib-2.18:2
+	>=lxde-base/menu-cache-1.1.0-r1:=
+	~x11-libs/libfm-extra-${PV}
+	gtk? ( x11-libs/gtk+:3 )
+	udisks? ( dev-libs/dbus-glib )
+"
+RDEPEND="${DEPEND}
+	!lxde-base/lxshortcut
+	x11-misc/shared-mime-info
+	automount? (
+		udisks? ( gnome-base/gvfs[udev,udisks] )
+		!udisks? ( gnome-base/gvfs[udev] )
+	)
+	exif? ( media-libs/libexif )
+"
+BDEPEND="
+	app-arch/xz-utils
+	dev-util/glib-utils
+	>=dev-util/intltool-0.40
+	sys-devel/gettext
+	virtual/pkgconfig
+	doc? ( dev-util/gtk-doc )
+	vala? ( $(vala_depend) )
+"
+
+PATCHES=(
+	"${FILESDIR}/${P}-buildsystem.patch"
+	"${FILESDIR}/${PN}-1.3.2-c99.patch"
+)
+
+src_prepare() {
+	xdg_src_prepare
+
+	if ! use doc; then
+		sed -ie '/^SUBDIR.*=/s#docs##' Makefile.am || die
+		sed -ie '/^[[:space:]]*docs/d' configure.ac || die
+	fi
+
+	# disable unused translations. Bug #356029
+	cat <<-EOF >> po/POTFILES.in || die
+data/ui/app-chooser.ui
+data/ui/ask-rename.ui
+data/ui/exec-file.ui
+data/ui/file-prop.ui
+data/ui/preferred-apps.ui
+data/ui/progress.ui
+EOF
+
+	# subslot sanity check
+	local sub_slot=${SLOT#*/}
+	local libfm_major_abi=$(sed -rne '/ABI_VERSION/s:.*=::p' src/Makefile.am | tr ':' '.')
+
+	if [[ ${sub_slot} != ${libfm_major_abi} ]]; then
+		eerror "Ebuild sub-slot (${sub_slot}) does not match ABI_VERSION(${libfm_major_abi})"
+		eerror "Please update SLOT variable as follows:"
+		eerror "    SLOT=\"${SLOT%%/*}/${libfm_major_abi}\""
+		eerror
+		die "sub-slot sanity check failed"
+	fi
+
+	eautoreconf
+	rm -r autom4te.cache || die
+	use vala && export VALAC="$(type -p valac-$(vala_best_api_version))"
+}
+
+src_configure() {
+	local myeconfargs=(
+		--disable-static
+		--with-html-dir=/usr/share/doc/${PF}/html
+		$(use_enable debug)
+		$(use_enable doc gtk-doc)
+		$(use_enable examples demo)
+		$(use_enable exif)
+		$(use_with gtk gtk 3)
+		$(use_enable udisks)
+		$(use_enable vala old-actions)
+	)
+	econf "${myeconfargs[@]}"
+}
+
+src_install() {
+	default
+	find "${ED}" -name '*.la' -delete || die
+	# Sometimes a directory is created instead of a symlink. No idea why...
+	# It is wrong anyway. We expect a libfm-1.0 directory and then a libfm
+	# symlink to it.
+	if [[ -h ${D}/usr/include/${PN} || -d ${D}/usr/include/${PN} ]]; then
+		rm -r "${D}"/usr/include/${PN} || die
+	fi
+	# Remove files installed by split-off libfm-extra package
+	rm "${D}"/usr/include/libfm-1.0/fm-{extra,version,xml-file}.h || die
+	rm "${D}"/usr/$(get_libdir)/libfm-extra* || die
+	rm "${D}"/usr/$(get_libdir)/pkgconfig/libfm-extra.pc || die
+}
+
+pkg_preinst() {
+	xdg_pkg_preinst
+	# Resolve the symlink mess. Bug #439570
+	if [[ -d "${ROOT}"/usr/include/${PN} ]]; then
+		rm -rf "${ROOT}"/usr/include/${PN} || die
+	fi
+	if [[ -d "${D}"/usr/include/${PN}-1.0 ]]; then
+		cd "${D}"/usr/include || die
+		ln -s --force ${PN}-1.0 ${PN} || die
+	fi
+}


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-03-17  3:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-17  3:20 [gentoo-commits] repo/gentoo:master commit in: x11-libs/libfm/, x11-libs/libfm/files/ Sam James
  -- strict thread matches above, loose matches on Subject: below --
2021-03-15  9:19 Andreas Sturmlechner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox