On Sep 21, 2008, at 8:53 PM, [EMAIL PROTECTED] wrote:

> I am trying to create a port file for an application (not mine)  
> that is made up of about 6 distribution files that are (partially)  
> self-contained but all are needed for the overall 'install'. Some  
> of the distribution files documentation or data etc., but all  
> require a "./configure" operation.
>
> I have been able to download all of the files and extract them into  
> separate directories. My problem comes in executing the 'Configure'  
> phase which, according to the 'Guide' operates in "${worksrcpath}"  
> which has a default definition of "${workpath}/${worksrcdir}". The  
> "${workpath}" part is fine, but "${worksrcdir}" would appear to  
> expect a single directory name (default of "${distname}" which is  
> made up of the name and version number of the whole application)  
> and I need it to be different for each of the files.
>
> I could split this into multiple port files except that the final  
> install needs to be performed as a single unit (as far as I can  
> tell - I'm trying to check this out) so that the executables,  
> documentation and read-only data files are all placed into the  
> final directory tree at the same time and the various environment  
> variable paths updated (if necessary).
>
> I have tried redefining "${worksrcdir}" to contain multiple names  
> but this seems to apply all of the names at once to each of the  
> invocations of "./configure" which causes the shell to reject the  
> path name (surprise!).
>
> Is there a way to get the configure phase to operate in a sequence  
> of directories and multiple times?

Port phases run only once per port. If you want to run multiple  
configure commands, you'll have to rewrite the configure phase to do  
that.

If there is a "primary" distfile and then several additional  
distfiles, you could leave the worksrcdir pointing to the primary one  
and let it configure that. Then, in the post-configure, you can run ./ 
configure on the others. e.g.:

worksrcdir      primary-${version}
post-configure {
        foreach thing {foo-1.0 bar-2.5 baz-3.14} {
                system "cd ${thing} && ./configure ${configure.pre_args}"
        }
}
_______________________________________________
macports-users mailing list
macports-users@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macports-users

Reply via email to