fetching via git and worksrcdir

Christoph Iserlohn ciserlohn at macports.org
Mon Aug 15 12:14:24 PDT 2011


Am 15.08.11 19:50, schrieb Titus von Boxberg:
> Hi,
>
> I'm trying to write a Portfile for a library that is to be fetched 
> with git.
>
> The lib has to be configured and built within a subdir  named "src" 
> (below the lib's root dir).
>
> Setting worksrcdir to ${distname}/src causes git to clone the repo 
> into that directory
> instead of ${workpath}/${distname}.
>
> How am I supposed to tell the build phases the correct working directory?
>
> And, just for curiosity, is exporting the repo to 
> ${workpath}/${worksrcdir} what was intended?
> As far as I can see this is done by git and hg only (?).
>
>
This bug is handled in https://trac.macports.org/ticket/29093 which has 
proposed fix,
but unfortunately it is not commited yet.

As a (quite ugly) workaround you can set ${worksrcdir} in pre-configure, 
e.g:

pre-configure {
     worksrcdir ${workspath}/src
}

But this means you can't run phases after configure (build, destroot) as 
a separate step. So
you need to set the ${worksrcdir} in pre-build and pre-destroot too:

pre-build {
     worksrcdir ${workspath}/src
}

pre-destroot {
     worksrcdir ${workspath}/src
}

-- 
Christoph

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-dev/attachments/20110815/48249ca1/attachment.html>


More information about the macports-dev mailing list