How to best check a configuration of another port/package?
Adam Weinberger
adamw at adamw.org
Sun Jun 9 15:48:31 UTC 2019
On Sat, Jun 8, 2019 at 11:00 PM Mel Pilgrim
<list_freebsd at bluerosetech.com> wrote:
>
> On 2019-06-08 9:57, Adam Weinberger wrote:
> > On Sat, Jun 8, 2019 at 10:02 AM Gerald Pfeifer <gerald at 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.
>
> Why is a slave port the correct option here instead of flavouring binutils?
No, you're absolutely right. Flavours is the right way to do it now. I
keep forgetting about them, because I don't in any way understand how
to use them.
# Adam
--
Adam Weinberger
adamw at adamw.org
https://www.adamw.org
More information about the freebsd-ports
mailing list