Metaport

Ryan Schmidt ryandesign at macports.org
Thu Oct 15 09:08:28 PDT 2009


On Oct 15, 2009, at 10:26, vincent habchi wrote:

> Le 15 oct. 2009 à 16:17, Joshua Root a écrit :
>
>> under dports/_resources/port1.0/group/
>
> Thanks. Is there any kind of doc?

Only the comments in the portgroup file, as far as I know, and looking  
at existing portfiles that use it.


> More specifically, does the Portfile of the muniversal group know of  
> the variable values set by muniversal? Still more specifically, I  
> need to alter a configuration switch according to whether the  
> compilation is 32 or 64-bit. Is this possible through a test on $ 
> {os.arch}?

This is possible without needing to do anything complicated. You can  
just set the merger_configure_args list with the desired values. There  
are some existing ports that use this, which you can look at for  
examples: nspr uses it to add "--enable-64bit" on 64-bit  
architectures. fontconfig uses it to specify the architecture in a "-- 
with-arch" flag. tiff uses it to ensure "--with-apple-opengl- 
framework" is not used on 64-bit architectures on Tiger. gtk2 adds "-- 
disable-cups" on 64-bit architectures on Tiger. fftw-3 adds "--enable- 
fma" on PowerPC systems and "--enable-sse2" on Intel systems.


You probably won't need this, but aside from the muniversal portgroup,  
there is also the almost-forgotten "merge" procedure. This is useful  
if you already have multiple binaries and just want to lipo them  
together. I use it in the minivmac portfile, though to see it in  
action, you'll have to use the minivmac-devel portfile and build  
MacPorts trunk, since MacPorts 1.8.1's merge had some bugs which made  
it not work for my needs. I say you probably won't need the merge  
procedure for your task, because you also need to configure and build  
for each arch. So you're better off using muniversal which was  
designed exactly for this.





More information about the macports-dev mailing list