[27427] trunk/dports/graphics/gimp2/Portfile

Ryan Schmidt ryandesign at macports.org
Sat Aug 4 03:53:23 PDT 2007


On Aug 4, 2007, at 04:03, Rainer Müller wrote:

>> The point is that internals and default become less transparant  
>> and more
>> complex for the user.
>
> I admit it is a little bit more complex to deselect  
> default_variants if
> they are conflicting, like in the python24/python25 case... But after
> all, it makes sense to write something like -python25 +python24 (think
> that as "without python25, with python24").

See my ports minivmac and pdftk for workarounds to make this easier  
for the user. I only select the default_variants if no conflicting  
variants have been selected.



minivmac can emulate several early Mac models. If you don't specify  
otherwise, it emulates a Mac Plus.


if { ![variant_isset mac128k] && ![variant_isset mac512k] && ! 
[variant_isset mac512ke] && ![variant_isset macse] } {
	default_variants +macplus
}

variant mac128k conflicts mac512k mac512ke macplus macse description  
{Emulate a Macintosh with 128K RAM and 2 drives} {
	patchfiles-append patch-CNFGGLOB.h-mac128k.diff
}

variant mac512k conflicts mac128k mac512ke macplus macse description  
{Emulate a Macintosh 512K with 512K RAM and 2 drives} {
	patchfiles-append patch-CNFGGLOB.h-mac512k.diff
}

variant mac512ke conflicts mac128k mac512k macplus macse description  
{Emulate a Macintosh 512Ke with 512K RAM and 6 drives} {
	patchfiles-append patch-CNFGGLOB.h-mac512ke.diff
}

variant macplus conflicts mac128k mac512k mac512ke macse description  
{Emulate a Macintosh Plus with 4 MB RAM and 6 drives (default)} {
	# Mac Plus emulation is the default so we don't need to do anything  
here
}

variant macse conflicts mac128k mac512k mac512ke macplus description  
{Emulate a Macintosh SE with 4 MB RAM and 6 drives} {
	patchfiles-append patch-CNFGGLOB.h-macse.diff
}



pdftk can be compiled with any version of gcc. By default I want to  
use the latest, gcc42, but if the user is on a slow PowerPC Mac and  
already has an earlier gcc and doesn't want to spend a day upgrading,  
they can use another variant.


if { ![variant_isset with_gcc34] && ![variant_isset with_gcj34] && ! 
[variant_isset with_gcc41] && ![variant_isset with_gcc42] } {
	default_variants    +with_gcc42
}

variant with_gcc34 conflicts with_gcj34 with_gcc41 with_gcc42 i386  
description {Build using gcc34 (PowerPC only)} {
	depends_lib-append  port:gcc34
	build.args-append   VERSUFF=-dp-3.4
}

variant with_gcj34 conflicts with_gcc34 with_gcc41 with_gcc42 i386  
description {Build using gcj34 (PowerPC only)} {
	depends_lib-append  port:gcj34
	build.args-append   TOOLPATH=${prefix}/gcj34-3.4.5/bin/
}

variant with_gcc41 conflicts with_gcc34 with_gcj34 with_gcc42 i386  
description {Build using gcc41 (PowerPC only)} {
	depends_lib-append  port:gcc41
	build.args-append   TOOLPATH=${prefix}/bin/ VERSUFF=-mp-4.1
}

variant with_gcc42 conflicts with_gcc34 with_gcj34 with_gcc41  
description {Build using gcc42 (default)} {
	depends_lib-append  port:gcc42
	build.args-append   TOOLPATH=${prefix}/bin/ VERSUFF=-mp-4.2
}

platform i386 {}






More information about the macports-dev mailing list