A PortGroup for building more 32/64-bit universal packages

Ryan Schmidt ryandesign at macports.org
Thu Jan 22 04:10:05 PST 2009


On Jan 12, 2009, at 15:19, Marcus Calhoun-Lopez wrote:

> I have a need of more 32/64-bit universal packages.
> To facilitate this, I would like to propose a PortGroup with a  
> different
> universal build mechanism than the default.
> See http://trac.macports.org/ticket/17972.
>
> It is intended to be an improvement of the merge function.
>
> Any feedback would be greatly appreciated.
> The only time I write in Tcl is on MacPorts related projects.

As I mentioned before, I wanted to start switching my ports to this  
mechanism because I'm tired of bit-size issues and to a lesser extent  
endian issues with the old all-at-once mechanism which one never  
knows about until one tries to use some part of the software and it  
doesn't work right.

I decided to start with pkgconfig because it has no dependencies and  
has issues building 64-bit with the old way.

It doesn't build 64-bit with the new way either. Turns out its  
included copy of glib 1.2.10 wants to run a compiled program during  
the configure phase. I'm on a 64-bit Intel Mac, so once it gets to  
the ppc64 architecture, it can't run that program, because Rosetta  
can't run 64-bit PowerPC code. Presumably if I were on a G5 Mac it  
would be able to get through the ppc and ppc64 architectures, but not  
the i386 or x86_64 architectures. If I were on a G4 Mac it would  
probably only manage the ppc architecture.

The merge-universal portgroup has this fancy new  
universal_archs_supported keyword -- thanks for that! -- but I'm not  
sure how to write a portfile to express:

if {build machine is powerpc} {
	if {build machine is 64-bit} {
		universal_archs_supported ppc ppc64
	} else if {build machine is 32-bit} {
		universal_archs_supoprted ppc
		# at this point I may as well just write "universal_variant no"
	}
} else if {build machine is intel} {
	if {build machine is 64-bit} {
		universal_archs_supported ppc i386 x86_64
	} else if {build machine is 32-bit} {
		universal_archs_supported ppc i386
	}
}

Even if there were portfile syntax to test the bit-ness of the build  
machine, I wouldn't want to have the above situation; it's awful.

There's a bug open with the authors of pkg-config but there has been  
no response to it in a year and a half so I'm not hopeful. I suppose  
I should ask the authors of glib instead.

https://bugs.freedesktop.org/show_bug.cgi?id=11464




More information about the macports-dev mailing list