Re: How to correctly reference WRKSRC of another port?

From: Chris <portmaster_at_bsdforge.com>
Date: Tue, 25 May 2021 09:59:26 -0700
On 2021-05-25 04:27, Ronald Klop wrote:
> Van: Philipp Ost <pj_at_smo.de>
> Datum: maandag, 24 mei 2021 20:16
> Aan: ports_at_freebsd.org
> Onderwerp: How to correctly reference WRKSRC of another port?
>> 
>> Hi everyone,
>> 
>> I'm currently working on a port (my first ;-)) which has a (optional) build 
>> time dependency on the sources of math/nauty.
>> 
>> Currently, I've hardwired '/usr/ports/math/nauty/work/nauty27r1' as 
>> argument to the configure script, but that's clearly not the way to do it.
>> 
>> The Porter's Handbook mentions using WRKDIRPREFIXPORTSDIR [0], but that 
>> does not work. A search for WRKDIRPREFIXPORTSDIR in /usr/ports/Mk comes up 
>> empty. Do I explicitly have to define this variable?
>> 
>> I've set NAUTY_BUILD_DEPENDS=nauty>0:math/nauty:extract. How do I correctly 
>> reference nauty's WRKSRC?
>> 
>> It would be nice if anyone could point me in the right direction.
>> 
>> Thanks in advance!
>> 
>> Philipp
>> 
>> 
>> [0] 
>> https://docs.freebsd.org/en/books/porters-handbook/porting-dads/#porting-wrkdirprefix
>> 
> 
> 
> Hi,
> 
> I have no opinion on this, but just trying to think along.
> Isn't it easier to add the math/nauty sources to the DISTFILES of your port?
There must be a 101 ways to do this. But not having looked at the source for 
your
port, I'm inclined with Ronald.
It wouldn't be unlike getting/using 2 sources from GitHub and combining them 
for
the build. Simply use knob set aside for extra sources. IOW fetch the "extra" 
source
and unpack it in the ${WRKSRC} tree along with your source && include the 
needed
headers from there.

HTH and good luck!

--Chris
> 
> Ronald.

Received on Tue May 25 2021 - 16:59:26 UTC

Original text of this message