From 2b930c0faba0274adfd93409e74c1bb603cdbe99 Mon Sep 17 00:00:00 2001 From: Thomas Perale Date: Sat, 26 Jul 2025 11:31:05 +0200 Subject: [PATCH] package/ghostscript: fix xlib dependency Since the package bump to v10.05.0 the xlib libraries detection has been improved to error missing x libraries (see [2]). The following error is happening on the autobuilder when building ghostscript with xlib_libX11: ``` checking for XOpenDisplay in -lX11... yes checking for XdbeQueryExtension in -lXext... yes checking for XtAppCreateShell in -lXt... no configure: error: X11 libraries (libX11, libXt, libXext) not available, either install them, or rerun configure with "--without-x" make: *** [package/pkg-generic.mk:263: /home/buildroot/instance-0/output-1/build/ghostscript-10.05.1/.stamp_configured] Error 1 ``` This error can be reproduced with the following config: ``` cat <.config BR2_arm=y BR2_cortex_a7=y BR2_TOOLCHAIN_EXTERNAL=y BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y BR2_PACKAGE_XORG7=y BR2_PACKAGE_XLIB_LIBX11=y BR2_PACKAGE_GHOSTSCRIPT=y EOF make olddefconfig make ``` This patch fixes the xlib dependencies of the ghostscript package to correctly build with X support: - The 'XtAppCreateShell' function is provided by the package 'xlib_libXt'. - The 'XdbeQueryExtension' function is provided by the package 'xlib_libXext'. They both select the 'xlib_libX11' package. [1] 9abf662cfd package/ghostscript: security bump to version 10.05.0 [2] https://github.com/ArtifexSoftware/ghostpdl/commit/37eede31e12814fae69744e7842a5640004e5a65 Fixes: https://autobuild.buildroot.org/results/45d/45d0414f341feb2354478b145396fe137f9cc6a6 Signed-off-by: Thomas Perale Signed-off-by: Romain Naour (cherry picked from commit 9adc8a05707f743c659cc6fb25d0a213498d0868) Signed-off-by: Thomas Perale --- package/ghostscript/ghostscript.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/ghostscript/ghostscript.mk b/package/ghostscript/ghostscript.mk index 0ddcb950ff..c9d13f5545 100644 --- a/package/ghostscript/ghostscript.mk +++ b/package/ghostscript/ghostscript.mk @@ -85,8 +85,8 @@ else GHOSTSCRIPT_CONF_OPTS += --disable-cups endif -ifeq ($(BR2_PACKAGE_XLIB_LIBX11),y) -GHOSTSCRIPT_DEPENDENCIES += xlib_libX11 +ifeq ($(BR2_PACKAGE_XLIB_LIBXT)$(BR2_PACKAGE_XLIB_LIBXEXT),yy) +GHOSTSCRIPT_DEPENDENCIES += xlib_libXt xlib_libXext GHOSTSCRIPT_CONF_OPTS += --with-x else GHOSTSCRIPT_CONF_OPTS += --without-x