All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 2/3] package/perl-gd: needs perl-extutils-pkgconfig
Date: Mon, 25 Jan 2021 22:04:19 +0100	[thread overview]
Message-ID: <CAPi7W82JBBH6bRjH2L2-RvM-1V0kXGVZm8BFsijgT7aUOZ+gVA@mail.gmail.com> (raw)
In-Reply-To: <20210125214840.78cd755e@windsurf.home>

Hello,

Le lun. 25 janv. 2021 ? 21:48, Thomas Petazzoni
<thomas.petazzoni@bootlin.com> a ?crit :
>
> Hello,
>
> +Fran?ois in Cc.
>
> On Sun, 24 Jan 2021 12:22:13 +0100
> Fabrice Fontaine <fontaine.fabrice@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

  reply	other threads:[~2021-01-25 21:04 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-24 11:22 [Buildroot] [PATCH 1/3] package/perl-extutils-pkgconfig: new package Fabrice Fontaine
2021-01-24 11:22 ` [Buildroot] [PATCH 2/3] package/perl-gd: needs perl-extutils-pkgconfig Fabrice Fontaine
2021-01-25 20:48   ` Thomas Petazzoni
2021-01-25 21:04     ` Fabrice Fontaine [this message]
2021-02-11  7:51       ` François Perrad
2021-02-11  7:50   ` François Perrad
2021-01-24 11:22 ` [Buildroot] [PATCH 3/3] package/perl-gd: provide gd options Fabrice Fontaine
2021-02-11  7:47   ` François Perrad
2021-02-11  7:44 ` [Buildroot] [PATCH 1/3] package/perl-extutils-pkgconfig: new package François Perrad

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAPi7W82JBBH6bRjH2L2-RvM-1V0kXGVZm8BFsijgT7aUOZ+gVA@mail.gmail.com \
    --to=fontaine.fabrice@gmail.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.