rrdtool: Fix do_configure by exporting ABS_TOP_BUILDDIR for perl bindings

1.10.3 grew a third branch in bindings/perl-shared/Makefile.PL: when
ABS_TOP_BUILDDIR is unset it assumes a standalone build, pkg-config
probes for an installed librrd and dies.

| pkg-config could not find librrd. Is rrdtool installed?
| Try: brew install rrdtool (macOS) or apt install librrd-dev (Debian/Ubuntu)

bindings/Makefile.am always passes ABS_TOP_SRCDIR, ABS_TOP_BUILDDIR and
ABS_SRCDIR when it runs Makefile.PL, but do_configure re-runs it by hand
to redo the perl bindings and did not. Export them there too so the
in-tree branch is taken and RRDs links against -L${B}/src/.libs -lrrd.

Verified on aarch64 for qemuarm64: do_configure fails before the change
with the error above, and do_compile and do_package succeed after.

Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
This commit is contained in:
Khem Raj
2026-08-05 23:37:22 -07:00
parent 3379535ca9
commit 69e2b9e79c
@@ -97,9 +97,14 @@ do_configure() {
${B}/bindings/Makefile
#redo the perl bindings
# perl-shared/Makefile.PL only links against the in-tree librrd when
# ABS_TOP_BUILDDIR is set, which is what bindings/Makefile.am does. Without
# it the standalone branch pkg-config probes for an installed librrd and
# dies with "pkg-config could not find librrd", so export them here too.
(
cd ${S}/bindings/perl-shared;
perl Makefile.PL INSTALLDIRS="vendor" INSTALLPRIVLIB="abc";
ABS_TOP_SRCDIR="${S}" ABS_TOP_BUILDDIR="${B}" ABS_SRCDIR="${S}/bindings/perl-shared" \
perl Makefile.PL INSTALLDIRS="vendor" INSTALLPRIVLIB="abc";
cd ../../bindings/perl-piped;
perl Makefile.PL INSTALLDIRS="vendor";