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

François Perrad francois.perrad at gadz.org
Thu Feb 11 07:51:58 UTC 2021


Le lun. 25 janv. 2021 à 22:05, Fabrice Fontaine <fontaine.fabrice at gmail.com>
a écrit :

> 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.
>

the patch against Makefile.PL is fine.

François


> >
> > Thomas
> > --
> > Thomas Petazzoni, CTO, Bootlin
> > Embedded Linux and Kernel engineering
> > https://bootlin.com
> Best Regards,
>
> Fabrice
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20210211/326392bd/attachment.html>


More information about the buildroot mailing list