diff mbox series

[meta-oe] gnuplot: add x11 PACKAGECONFIG

Message ID 20250227153529.82380-1-paul.leguendekerneizon@savoirfairelinux.com
State New
Headers show
Series [meta-oe] gnuplot: add x11 PACKAGECONFIG | expand

Commit Message

Paul Le Guen de Kerneizon Feb. 27, 2025, 3:35 p.m. UTC
Currently, gnuplot recipe requires the x11 distro feature to be built.
However, X11 is not needed for running gnuplot as long as we don't use
a gnuplot X11 terminal.
This commit adds the x11 package config used to make the need of x11
distro feature optional to build gnuplot.

Signed-off-by: Paul Le Guen de Kerneizon <paul.leguendekerneizon@savoirfairelinux.com>
---
 meta-oe/recipes-extended/gnuplot/gnuplot_5.4.3.bb | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

--
2.34.1

Comments

Gyorgy Sarvari Feb. 27, 2025, 5:15 p.m. UTC | #1
On 27.02.25 16:35, Paul Le Guen de Kerneizon via lists.openembedded.org
wrote:
> +PACKAGECONFIG[x11] = ",,virtual/libx11"
You could also pass --with-x/--without-x to explicitly control the
inclusion of x11-specific parts (though I'm writing this without trying
the resulting package - if this config options not the wisest thing to
do, then I won't push it any further...)
Paul Le Guen de Kerneizon Feb. 28, 2025, 1:05 p.m. UTC | #2
Thanks for your reply; I saw these args after, I did the needed 
modification in the v2 patch.

Thanks,

On 27/02/2025 18:15, Gyorgy Sarvari wrote:
> On 27.02.25 16:35, Paul Le Guen de Kerneizon via lists.openembedded.org
> wrote:
>> +PACKAGECONFIG[x11] = ",,virtual/libx11"
> You could also pass --with-x/--without-x to explicitly control the
> inclusion of x11-specific parts (though I'm writing this without trying
> the resulting package - if this config options not the wisest thing to
> do, then I won't push it any further...)
diff mbox series

Patch

diff --git a/meta-oe/recipes-extended/gnuplot/gnuplot_5.4.3.bb b/meta-oe/recipes-extended/gnuplot/gnuplot_5.4.3.bb
index fe5e5c067d..ba79534cb9 100644
--- a/meta-oe/recipes-extended/gnuplot/gnuplot_5.4.3.bb
+++ b/meta-oe/recipes-extended/gnuplot/gnuplot_5.4.3.bb
@@ -5,11 +5,10 @@  HOMEPAGE = "http://www.gnuplot.info/"
 SECTION = "console/scientific"
 LICENSE = "gnuplot"
 LIC_FILES_CHKSUM = "file://Copyright;md5=243a186fc2fd3b992125d60d5b1bab8f"
-DEPENDS = "${BPN}-native virtual/libx11 gd readline"
+DEPENDS = "${BPN}-native gd readline"

 inherit autotools features_check pkgconfig
 # depends on virtual/libx11
-REQUIRED_DISTRO_FEATURES = "x11"

 SRC_URI = "${SOURCEFORGE_MIRROR}/project/${BPN}/${BPN}/${PV}/${BP}.tar.gz;name=archive \
            http://www.mneuroth.de/privat/zaurus/qtplot-0.2.tar.gz;name=qtplot \
@@ -37,11 +36,11 @@  do_install:class-native() {
 	install ${B}/docs/*doc* ${D}${bindir}
     rm ${D}${bindir}/*.o
 }
-
-PACKAGECONFIG ??= "cairo"
+PACKAGECONFIG ??= "cairo ${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}"
 PACKAGECONFIG[cairo] = "--with-cairo,--without-cairo,cairo pango"
 PACKAGECONFIG[lua] = "--with-lua,--without-lua,lua"
 PACKAGECONFIG[qt5] = "--with-qt --with-qt5nativesysroot=${STAGING_DIR_NATIVE},--without-qt,qtbase-native qtbase qtsvg qttools-native"
+PACKAGECONFIG[x11] = ",,virtual/libx11"

 EXTRA_OECONF = " \
     --with-readline=${STAGING_LIBDIR}/.. \