How to compile a port with clang?

Mojca Miklavec mojca.miklavec.lists at gmail.com
Sun Jul 10 12:38:19 PDT 2011


On Sun, Jul 10, 2011 at 19:44, Jeremy Huddleston wrote:
> On Jul 10, 2011, at 10:19 AM, Mojca Miklavec wrote:
>
>> Hello,
>>
>> I would like to try to compile fontforge with clang compiler (since
>> the default one doesn't work). What exactly should I do?
>
> Why does it fail with the default compiler?  You should open a ticket for that.

There is already a ticket open.
    http://trac.macports.org/ticket/29840

But I don't know why the compiler is broken.

>> I was playing with portconfigure.tcl, but I'm not sure that I didn't
>> mess up something (I don't know what exactly I have to change and I
>> also didn't see any clang++ mention in that file).
>
> You can change the compiler for just that port in the Portfile.  Look at libsdl and wine for examples.

Thank you. After adding the same patch as in wine:

if {${configure.compiler} == "llvm-gcc-4.2" ||
    ${configure.compiler} == "clang"} {
    configure.compiler gcc-4.2
}

(except that I only wrote "configure.compiler clang") fontforge
compiles just fine now.

> You can change the global default in portconfigure.tcl

I tried that, but I was unsuccessful. What exactly do I need to change?

> I also sent in a patch to macports-dev about a month ago which would provide an option in macports.conf to set the default, but that's not going to happen in its current form.

Thank you, I'm looking forward for that.

Mojca


More information about the macports-users mailing list