meta-openembedded/meta-perl/recipes-perl/libstatgrab/libunix-statgrab_0.112.bb
Yoann Congal 09c7f76c19
libunix-statgrab: Put LD export in do_configure
Toolchains (gcc/clang) forcibly define LD (LD = ...), so, override it in
the do_configure task.

This fixes this build error (seen on AB[0]):
| Checking for pkg-config... .../tmp/work/x86-64-v3-poky-linux/libunix-statgrab/0.112/recipe-sysroot-native/usr/bin/pkg-config
| Checking for pkg-config package of libstatgrab... Unsupported compile language "C" at Makefile.PL line 39.
| -lstatgrab -lpthread
| Checking for library containing sg_get_process_stats_r... WARNING: .../run.do_configure.38403:154 exit 255 from 'perl Makefile.PL INSTALLDIRS=vendor NO_PERLLOCAL=1 NO_PACKLIST=1 PERL=$(which perl)'
| WARNING: Backtrace (BB generated script):
| 	#1: cpan_do_configure, .../tmp/work/x86-64-v3-poky-linux/libunix-statgrab/0.112/temp/run.do_configure.38403, line 154
| 	#2: do_configure, .../tmp/work/x86-64-v3-poky-linux/libunix-statgrab/0.112/temp/run.do_configure.38403, line 147
| 	#3: main, .../tmp/work/x86-64-v3-poky-linux/libunix-statgrab/0.112/temp/run.do_configure.38403, line 189
NOTE: recipe libunix-statgrab-0.112-r0: task do_configure: Failed
ERROR: Task (meta-openembedded/meta-perl/recipes-perl/libstatgrab/libunix-statgrab_0.112.bb:do_configure) failed with exit code '1'

[0]: https://autobuilder.yoctoproject.org/valkyrie/#/builders/87/builds/77/steps/38/logs/stdio

Signed-off-by: Yoann Congal <yoann.congal@smile.fr>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2025-11-23 00:12:01 -08:00

41 lines
1.4 KiB
BlitzBasic

SUMMARY = "Perl interface to the libstatgrab library"
DESCRIPTION = "Unix::Statgrab is a wrapper for libstatgrab as available from \
<http://www.i-scream.org/libstatgrab/>. It is a reasonably portable attempt \
to query interesting stats about your computer. It covers information on \
the operating system, CPU, memory usage, network interfaces, hard-disks \
etc."
HOMEPAGE = "https://metacpan.org/release/Unix-Statgrab"
SECTION = "libs"
LICENSE = "Artistic-1.0 | GPL-1.0-or-later | LGPL-2.1-or-later"
DEPENDS += "libcapture-tiny-perl-native"
DEPENDS += "libconfig-autoconf-perl-native"
DEPENDS += "libstatgrab"
RDEPENDS:${PN} += "\
libstatgrab \
perl-module-autoloader \
perl-module-carp \
perl-module-dynaloader \
perl-module-exporter \
perl-module-strict \
perl-module-vars \
perl-module-warnings \
"
SRC_URI = "${CPAN_MIRROR}/authors/id/R/RE/REHSACK/Unix-Statgrab-${PV}.tar.gz"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Artistic-1.0;md5=cda03bbdc3c1951996392b872397b798 \
file://${COMMON_LICENSE_DIR}/GPL-1.0-or-later;md5=30c0b8a5048cc2f4be5ff15ef0d8cf61 \
file://${COMMON_LICENSE_DIR}/LGPL-2.1-or-later;md5=2a4f4fd2128ea2f65047ee63fbca9f68 \
"
SRC_URI[sha256sum] = "16a29f7acaeec081bf0e7303ba5ee24fda1d21a1104669b837745f3ea61d6afa"
S = "${UNPACKDIR}/Unix-Statgrab-${PV}"
inherit cpan pkgconfig ptest-perl
do_configure:prepend() {
# Toolchains forcibly define LD, so override it in the task
export LD="${CCLD}"
}