Mplayer Variant Help

Ryan Schmidt ryandesign at macports.org
Wed May 13 19:38:26 PDT 2009


On May 13, 2009, at 12:25, EmmGunn wrote:

> I'm looking at the different variants for mplayer and most of them  
> are self explanatory, but I have a couple of questions.  I noticed  
> this in the port file:
>
> 83	# configure is not autoconf
> 84	universal_variant no
>
> which I took to mean that a universal variant is not available,

That's correct. Because mplayer does not use a standard autoconf  
configure script, the standard universal variant does not work with  
it. If someone wanted to invest some time in figuring out how to make  
mplayer compile universal, it could probably be done by writing a  
custom universal variant for that port.

> but then I see a binary_codecs variant which has something about  
> powerpc and i386.  What does this do exactly?  Is this something  
> equivalent to a universal variant?  I was hoping to compile a  
> universal build of mplayer.

Sorry, the port says "universal_variant no", which means someone  
tried to build a universal binary and found that it failed, and added  
this to the portfile to save you the trouble. If you really want a  
universal binary, you will have to write a custom universal variant  
for this port. If you do, please contribute it back to us so that we  
can put it in the portfile.

> Also, just out of curiosity, what are the darwin and darwin_8  
> variants.  I couldn't find anything about them either.  Thanks in  
> advance for any help.

These are platform variants. If they are present in a portfile,  
MacPorts automatically selects them on the appropriate platform.  
"darwin" variants are selected on operating systems based on Darwin,  
including Mac OS X. darwin_8 is selected on Darwin 8.x operating  
systems, such as Mac OS X 10.4.x. Darwin 9.x would be Mac OS X  
10.5.x, and so on. darwin_i386 is selected if you're running Darwin  
(or Mac OS X) on an Intel processor. darwin_powerpc is selected if  
you're running Darwin (or Mac OS X) on a PowerPC processor. You never  
select these variants manually; MacPorts does it for you if  
necessary. Ports use these variants if they need different  
instructions to build correctly in different kinds of environments.

The description of the binary_codecs variant says "Enable platform- 
specific binary codecs". Most ports in MacPorts are compiled from  
source but sometimes bits are only available as pre-compiled  
binaries, as is apparently the case for the codecs this variant wants  
to enable. This variant seems to be designed to download one file for  
PowerPC computers and a different file for Intel computers, and then  
install their contents. However, I don't believe the variant  
functions as intended. It checks whether variants darwin_i386 or  
darwin_powerpc are set. Since the port does not declare any variants  
by those names, those variants are never set, hence the binary_codecs  
variant never does anything. This is a bug in the portfile. It looks  
like when the binary_codecs variant was set up in r20652, darwin_i386  
and darwin_powerpc variants did exist in the port, but they were  
subsequently removed without considering the effect that would have  
on the binary_codecs variant. I fixed this bug just now, but now the  
variant produces an error. Since I'm not an MPlayer expert I filed a  
ticket for this problem:

http://trac.macports.org/ticket/19619



More information about the macports-users mailing list