Creating a new port
Joshua Root
jmr at macports.org
Tue Oct 7 14:31:46 PDT 2008
C. Florian Ebeling wrote:
> On Tue, Oct 7, 2008 at 10:10 PM, Joshua Root <jmr at macports.org> wrote:
>> C. Florian Ebeling wrote:
>>> - git is not supported for fetching, but svn is.
>> You can write your own fetch phase if you really need to use git.
>
> that's one thing i would like to hear more about. how do you do that?
> or can you point to an example portfile maybe? is the understanding
> that you still have cached distfiles, or would you pull them regardless
> what lies around already?
You'd do something like:
depends_build port:git-core
fetch {
set git.url <whatever>
system "cd ${workpath} && git clone ${git.url} ${worksrcdir}"
}
You could be a bit more clever by fetching to ${distpath} and copying to
${workpath} in extract, which would save cloning every time.
- Josh
More information about the macports-dev
mailing list