Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 8 Jun 2019 10:57:23 -0600
From:      Adam Weinberger <adamw@adamw.org>
To:        Gerald Pfeifer <gerald@pfeifer.com>
Cc:        FreeBSD Ports <ports@freebsd.org>
Subject:   Re: How to best check a configuration of another port/package?
Message-ID:  <CAP7rwchv02%2B=XsfmJwECdfhh=4gm43aMRSjLb%2B_FcDpJghak6w@mail.gmail.com>
In-Reply-To: <alpine.LSU.2.21.1906081755150.3441@anthias.pfeifer.com>
References:  <alpine.LSU.2.21.1906081755150.3441@anthias.pfeifer.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Jun 8, 2019 at 10:02 AM Gerald Pfeifer <gerald@pfeifer.com> wrote:
>
> In https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=237688 we had
> a user report against lang/gcc* ports that could be traced back to
> a certain functionality (option) in another port (devel/binutils)
> missing.
>
> In pseudo-code this could be addressed as follows in lang/gcc*
>
>    .if $(binutils built statically)
>    IGNORE= GCC requires dynamically linked binutils
>    .endif
>
> Now the question is: How to implement something like this practically?

What you have there won't work, because `make index` won't work, plus
Makefiles shouldn't be doing external calls if they don't have to.
You'll also have a problem whereby LOCALBASE isn't defined yet, and I
don't believe that IGNORE after bsd.port.pre.mk will work (I could be
wrong about that).

You have two options:
1) Turn it into a pre-configure, which is slightly ugly for the
end-user but still gets the job done
  pre-configure:
      if some file in binutils is static; then echo "NOPE"; exit 1; fi

2) (The correct way to do it) Create a binutils-static slave port,
remove the static option from binutils proper, and depend specifically
on the non-static port.

# Adam


-- 
Adam Weinberger
adamw@adamw.org
https://www.adamw.org



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAP7rwchv02%2B=XsfmJwECdfhh=4gm43aMRSjLb%2B_FcDpJghak6w>