[Buildroot] [PATCH 09/23] package/{libfm, pcmanfm}: handle libgtk2 removal
Arnout Vandecappelle
arnout at rnout.be
Thu Sep 11 20:03:14 UTC 2025
On 10/09/2025 23:32, Thomas Petazzoni via buildroot wrote:
> As we're about to remove libgtk2, the libfm and pcmanfm packages need
> to be adjusted so that they work with libgtk3 only. This requires a
> bit of re-arrangment of the dependencies, to properly propagate the
> libgtk3 dependencies.
>
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni at bootlin.com>
Applied to master, thanks.
Regards,
Arnout
> ---
> package/libfm/Config.in | 34 ++++++++++++++++++++++------------
> package/libfm/libfm.mk | 11 ++---------
> package/pcmanfm/Config.in | 35 ++++++++++++++++++++++-------------
> package/pcmanfm/pcmanfm.mk | 11 ++---------
> 4 files changed, 48 insertions(+), 43 deletions(-)
>
> diff --git a/package/libfm/Config.in b/package/libfm/Config.in
> index e78bc99b76..f35e9a17fd 100644
> --- a/package/libfm/Config.in
> +++ b/package/libfm/Config.in
> @@ -1,15 +1,19 @@
> config BR2_PACKAGE_LIBFM
> bool "libfm"
> - depends on BR2_PACKAGE_XORG7
> - depends on BR2_USE_WCHAR # libglib2
> - depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2
> - depends on BR2_USE_MMU # libglib2
> - depends on BR2_INSTALL_LIBSTDCPP # libgtk2
> - depends on BR2_TOOLCHAIN_HAS_SYNC_4 # libgtk2 -> pango -> harfbuzz
> - depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # libgtk2 -> pango -> harfbuzz
> + depends on BR2_PACKAGE_HOST_RUSTC_ARCH_SUPPORTS # libgtk3
> + depends on BR2_USE_WCHAR # libgtk3, libglib2
> + depends on BR2_TOOLCHAIN_HAS_THREADS # libgtk3, libglib2
> + depends on BR2_USE_MMU # libgtk3, libglib2
> + depends on BR2_INSTALL_LIBSTDCPP # libgtk3
> + depends on BR2_TOOLCHAIN_HAS_SYNC_4 # libgtk3
> + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # libgtk3
> + depends on BR2_PACKAGE_HAS_LIBEGL || BR2_PACKAGE_HAS_LIBGL # libgtk3
> + depends on BR2_PACKAGE_XORG7 # libgtk3-x11
> + depends on BR2_PACKAGE_HAS_LIBGL # libgtk3-x1
> select BR2_PACKAGE_CAIRO
> select BR2_PACKAGE_LIBGLIB2
> - select BR2_PACKAGE_LIBGTK2 if !BR2_PACKAGE_LIBGTK3_X11
> + select BR2_PACKAGE_LIBGTK3
> + select BR2_PACKAGE_LIBGTK3_X11
> select BR2_PACKAGE_MENU_CACHE
> help
> A glib/gio-based library providing some file management
> @@ -22,9 +26,15 @@ config BR2_PACKAGE_LIBFM
>
> http://wiki.lxde.org/en/Libfm
>
> -comment "libfm needs X.org and a toolchain w/ wchar, threads, C++, gcc >= 4.9"
> +comment "libfm a toolchain w/ wchar, threads, C++, gcc >= 4.9"
> + depends on BR2_PACKAGE_HOST_RUSTC_ARCH_SUPPORTS
> depends on BR2_USE_MMU
> depends on BR2_TOOLCHAIN_HAS_SYNC_4
> - depends on !BR2_USE_WCHAR || !BR2_INSTALL_LIBSTDCPP || \
> - !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 || \
> - !BR2_TOOLCHAIN_HAS_THREADS || !BR2_PACKAGE_XORG7
> + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || \
> + !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
> +
> +comment "libfm needs X.org with an OpenGL backend"
> + depends on BR2_PACKAGE_HOST_RUSTC_ARCH_SUPPORTS
> + depends on BR2_USE_MMU
> + depends on BR2_TOOLCHAIN_HAS_SYNC_4
> + depends on !BR2_PACKAGE_XORG7 || BR2_PACKAGE_HAS_LIBGL
> diff --git a/package/libfm/libfm.mk b/package/libfm/libfm.mk
> index 29f6d7d56a..419fce59d8 100644
> --- a/package/libfm/libfm.mk
> +++ b/package/libfm/libfm.mk
> @@ -7,12 +7,13 @@
> LIBFM_VERSION = 1.3.2
> LIBFM_SOURCE = libfm-$(LIBFM_VERSION).tar.xz
> LIBFM_SITE = http://sourceforge.net/projects/pcmanfm/files
> -LIBFM_DEPENDENCIES = menu-cache libglib2 cairo
> +LIBFM_DEPENDENCIES = menu-cache libglib2 cairo libgtk3
> LIBFM_LICENSE = GPL-2.0+, LGPL-2.1+
> LIBFM_LICENSE_FILES = COPYING src/extra/fm-xml-file.c
> LIBFM_INSTALL_STAGING = YES
> # We're patching src/modules/Makefile.am
> LIBFM_AUTORECONF = YES
> +LIBFM_CONF_OPTS = --with-gtk=3
>
> ifeq ($(BR2_PACKAGE_LIBEXIF),y)
> LIBFM_CONF_OPTS += --enable-exif
> @@ -21,12 +22,4 @@ else
> LIBFM_CONF_OPTS += --disable-exif
> endif
>
> -ifeq ($(BR2_PACKAGE_LIBGTK3_X11),y)
> -LIBFM_CONF_OPTS += --with-gtk=3
> -LIBFM_DEPENDENCIES += libgtk3
> -else
> -LIBFM_CONF_OPTS += --with-gtk=2
> -LIBFM_DEPENDENCIES += libgtk2
> -endif
> -
> $(eval $(autotools-package))
> diff --git a/package/pcmanfm/Config.in b/package/pcmanfm/Config.in
> index 73b8c7c04c..a4522d88f4 100644
> --- a/package/pcmanfm/Config.in
> +++ b/package/pcmanfm/Config.in
> @@ -1,16 +1,20 @@
> config BR2_PACKAGE_PCMANFM
> bool "pcmanfm"
> - depends on BR2_PACKAGE_XORG7
> - depends on BR2_USE_WCHAR # libglib2
> - depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2
> - depends on BR2_USE_MMU # libglib2
> - depends on BR2_INSTALL_LIBSTDCPP # libgtk2
> - depends on BR2_TOOLCHAIN_HAS_SYNC_4 # libgtk2 -> pango -> harfbuzz
> - depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # libgtk2 -> pango -> harfbuzz
> + depends on BR2_PACKAGE_HOST_RUSTC_ARCH_SUPPORTS # libfm
> + depends on BR2_USE_WCHAR # libfm
> + depends on BR2_TOOLCHAIN_HAS_THREADS # libfm
> + depends on BR2_USE_MMU # libfm
> + depends on BR2_INSTALL_LIBSTDCPP # libfm
> + depends on BR2_TOOLCHAIN_HAS_SYNC_4 # libfm
> + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # libfm
> + depends on BR2_PACKAGE_HAS_LIBEGL || BR2_PACKAGE_HAS_LIBGL # libfm
> + depends on BR2_PACKAGE_XORG7 # libfm
> + depends on BR2_PACKAGE_HAS_LIBGL # libfm
> select BR2_PACKAGE_LIBFM
> select BR2_PACKAGE_MENU_CACHE
> select BR2_PACKAGE_LIBGLIB2
> - select BR2_PACKAGE_LIBGTK2 if !BR2_PACKAGE_LIBGTK3_X11
> + select BR2_PACKAGE_LIBGTK3
> + select BR2_PACKAGE_LIBGTK3_X11
> help
> PCMan File Manager (PCManFM) is a file manager application
> developed by Hong Jen Yee from Taiwan which is meant to be a
> @@ -18,10 +22,15 @@ config BR2_PACKAGE_PCMANFM
>
> http://wiki.lxde.org/en/PCManFM
>
> -comment "pcmanfm needs a toolchain w/ wchar, threads, C++, gcc >= 4.9"
> +comment "pcmanfm a toolchain w/ wchar, threads, C++, gcc >= 4.9"
> + depends on BR2_PACKAGE_HOST_RUSTC_ARCH_SUPPORTS
> depends on BR2_USE_MMU
> - depends on BR2_PACKAGE_XORG7
> depends on BR2_TOOLCHAIN_HAS_SYNC_4
> - depends on !BR2_USE_WCHAR || !BR2_INSTALL_LIBSTDCPP || \
> - !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 || \
> - !BR2_TOOLCHAIN_HAS_THREADS
> + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || \
> + !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
> +
> +comment "pcmanfm needs X.org with an OpenGL backend"
> + depends on BR2_PACKAGE_HOST_RUSTC_ARCH_SUPPORTS
> + depends on BR2_USE_MMU
> + depends on BR2_TOOLCHAIN_HAS_SYNC_4
> + depends on !BR2_PACKAGE_XORG7 || BR2_PACKAGE_HAS_LIBGL
> diff --git a/package/pcmanfm/pcmanfm.mk b/package/pcmanfm/pcmanfm.mk
> index 9b233f614d..46d750b1e6 100644
> --- a/package/pcmanfm/pcmanfm.mk
> +++ b/package/pcmanfm/pcmanfm.mk
> @@ -7,18 +7,11 @@
> PCMANFM_VERSION = 1.3.2
> PCMANFM_SOURCE = pcmanfm-$(PCMANFM_VERSION).tar.xz
> PCMANFM_SITE = http://sourceforge.net/projects/pcmanfm/files
> -PCMANFM_DEPENDENCIES = libglib2 menu-cache libfm $(TARGET_NLS_DEPENDENCIES)
> +PCMANFM_DEPENDENCIES = libglib2 menu-cache libfm libgtk3 $(TARGET_NLS_DEPENDENCIES)
> PCMANFM_LICENSE = GPL-2.0+
> PCMANFM_LICENSE_FILES = COPYING
> PCMANFM_CPE_ID_VALID = YES
> PCMANFM_CONF_ENV = LIBS=$(TARGET_NLS_LIBS)
> -
> -ifeq ($(BR2_PACKAGE_LIBGTK3_X11),y)
> -PCMANFM_CONF_OPTS += --with-gtk=3
> -PCMANFM_DEPENDENCIES += libgtk3
> -else
> -PCMANFM_CONF_OPTS += --with-gtk=2
> -PCMANFM_DEPENDENCIES += libgtk2
> -endif
> +PCMANFM_CONF_OPTS = --with-gtk=3
>
> $(eval $(autotools-package))
More information about the buildroot
mailing list