[Buildroot] [PATCH 2/3] package/perl-gd: needs perl-extutils-pkgconfig

Fabrice Fontaine fontaine.fabrice at gmail.com
Mon Jan 25 21:04:19 UTC 2021


Hello,

Le lun. 25 janv. 2021 à 21:48, Thomas Petazzoni
<thomas.petazzoni at bootlin.com> a écrit :
>
> Hello,
>
> +François in Cc.
>
> On Sun, 24 Jan 2021 12:22:13 +0100
> Fabrice Fontaine <fontaine.fabrice at gmail.com> wrote:
>
> > +- at INC     = qw(-I/usr/include -I/usr/include/gd) unless @INC;
> > ++#@INC     = qw(-I/usr/include -I/usr/include/gd) unless @INC;
>
> I'm certainly not very good with Perl, but doesn't the "unless @INC"
> means "if INC is not already specified" ?
I'm also not good with Perl but it seems to me that unless means
"unless @INC is empty (i.e. not already specified or empty)"
>
> > + @LIBPATH = qw(-L/usr/lib/X11 -L/usr/X11R6/lib -L/usr/X11/lib -L/usr/lib) unless @LIBPATH;
>
> And isn't that a problem, too ? These library paths are pretty horrible
> for cross-compilation.
LIBPATH will be overriden with the -L value added by our pkg-config
wrapper thanks to this piece of code:

@LIBS = split /\s+/,$libs;
if ($libdir) {
  if ($config) {
    @LIBPATH = map {s/^-L// && "-L$_"} split /\s+/,$ldflags;
    ($lib_gd_path = $libdir) =~ s!/[^/]+$!!;
  } else {
    $lib_gd_path = $libdir;
  }
  push @LIBPATH,"-L$libdir";
}

The issue is that INC will be empty because it is extracted from cflags:
@INC = map {s/^-I// && "-I$_"} split /\s+/,$cflags;

But a review from a Perl would be nice as this solution is indeed a bit ugly.
>
> Thomas
> --
> Thomas Petazzoni, CTO, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com
Best Regards,

Fabrice


More information about the buildroot mailing list