Re: How to override port Makefile to point to local directory?

From: Milan Obuch <freebsd-ports_at_dino.sk>
Date: Mon, 16 May 2022 08:40:32 UTC
On Sun, 15 May 2022 23:55:43 -0700
"Pat Maddox" <pat@patmaddox.com> wrote:

> On 15 May 2022, at 23:25, Tatsuki Makino wrote:
> 
> > Hello.
> >
> > Pat Maddox wrote on 2022/05/16 15:08:  
> >> I figure there’s gotta be some sort of `make SRCDIR=. install` to 
> >> bypass fetch & extract, but this will do for now.
> >>  
> >
> > Is it a variable DISTDIR or PACKAGES?
> >
> > If you write the following in /etc/make.conf, you can use a
> > different location only for certain port.
> >
> > .if !empty(.CURDIR:tA:M/home/you/DEV/<category>/port-im-developing)
> > DISTDIR= /home/you/dir_for_src
> > PACKAGES= /home/you/dir_for_put_pkg
> > WRKDIRPREFIX= /tmp/wrkdir
> > .endif
> >
> > Regards.  
> 
> That still downloads the zip file, but to a different directory.
> 
> The code for my application is in ~/dev/ports-mgmt/disport.
> 
> So instead of make trying to download a zip and extract it, I want to 
> tell it to get the code from ~/dev/ports-mgmt/disport.
> 
> Pat
> 

Hi,

maybe Pat wants Makefile targets do-fetch and do-extract, these are-
*replacing* standard fetch and extract actions. I am using it for
fetching some branch to test from local repository:

do-fetch:
	@echo nada

do-extract:
	@git -C ${GIT_DIR} worktree add -d ${WRKSRC} ${GIT_BRANCH}

In this case, NO_CHECKSUM=YES is probably needed as well.

Similarly, instead of git, you could use cp, tar or anything you like.

Hope this helps...

Regards,
Milan