Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 May 2022 11:22:10 -0700
From:      "Pat Maddox" <pat@patmaddox.com>
To:        "Milan Obuch" <freebsd-ports@dino.sk>
Cc:        "Tatsuki Makino" <tatsuki_makino@hotmail.com>, freebsd-ports@freebsd.org
Subject:   Re: How to override port Makefile to point to local directory?
Message-ID:  <931F458E-86D3-4EA2-826B-E725EC7AB99F@patmaddox.com>
In-Reply-To: <20220516104032.6aac9448@gpdm.dino.sk>
References:  <C4E1018F-B37F-48E1-BDCB-FD9150DBDB6E@patmaddox.com> <24d0482cd89dd98aa75fc9c89aa00201@bsdforge.com> <CA48E37F-67F0-40AD-9AE1-C8908E69E309@patmaddox.com> <E0751B45-4432-4B0B-AF70-21CC65302E37@patmaddox.com> <PSAPR03MB56396FA71D924DC784671D2FFACF9@PSAPR03MB5639.apcprd03.prod.outlook.com> <0037487A-4778-4D37-9A12-BBE0E58F9CB4@patmaddox.com> <20220516104032.6aac9448@gpdm.dino.sk>

next in thread | previous in thread | raw e-mail | index | archive | help
On 16 May 2022, at 1:40, Milan Obuch wrote:

> 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=E2=80=99s gotta be some sort of `make SRCDIR=3D. inst=
all` 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=3D /home/you/dir_for_src
>>> PACKAGES=3D /home/you/dir_for_put_pkg
>>> WRKDIRPREFIX=3D /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=3DYES is probably needed as well.
>
> Similarly, instead of git, you could use cp, tar or anything you like.
>
> Hope this helps...
>
> Regards,
> Milan

Based on a forum suggestion [1], I worked out that I can zip up my src =

directory and stick it in a local files repo. Then override GH_TAGNAME =

and MASTER_SITES when building locally. Here=E2=80=99s the script that do=
es =

the job: =

https://gist.github.com/patmaddox/d5d8a0e0df656072749bf18f7f634ae9#file-b=
uild-sh

I thought perhaps I could point make to a specific src directory, but it =

seems that it absolutely requires a zip file. Easy enough.

Pat

[1] =

https://forums.freebsd.org/threads/how-to-override-port-makefile-to-point=
-to-local-directory.85180/post-567203



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?931F458E-86D3-4EA2-826B-E725EC7AB99F>