Fwd: Dirty hack to get cairo compiled universally

Harry van der Wolf hvdwolf at gmail.com
Fri Aug 1 13:44:07 PDT 2008


I made another change to the Portfile for the variant no_x11 (see attached
renewed Portfile)

variant no_x11 conflicts glitz description {Omit X11 support} {
    depends_lib-delete \
        port:xrender \
        port:render
    configure.args-delete \
        --x-includes=${x11prefix}/include \
        --x-libraries=${x11prefix}/lib \
        --enable-xlib \
        --enable-xlib-xrender \
        --with-x
    configure.args-append \
        --disable-xlib \
        --disable-xlib-xrender \
        --without-x \
        --enable-atsui
}

I added "--enable-atsui" as the *ATSUI* font backend is primarily used to
render text on Apple OS X systems. Especially in combination with no_x11
that one should(!) be enabled. I use "sudo port install +no_x11 +universal"
to build Gtk applications with pango and gtk (both also with "--without-x"
configure setting)  that don't need X11 but run in native Quartz.


As mentioned in one of the earlier mail threads:
I always manually compiled cairo universally with: --enable-quartz
--enable-atsui --without-x
manually compiled pango universally with: --without-x
manually compiled gtk universally with: --with-gdktarget=quartz --without-x

As mentioned: This enables you to build Gtk-Quartz applications: Very nice!


Harry


---------- Forwarded message ----------
From: Harry van der Wolf <hvdwolf at gmail.com>
Date: 2008/8/1
Subject: Dirty hack to get cairo compiled universally
To: MacPorts Users <macports-users at lists.macosforge.org>


To get cairo compiled in macports using the correct SDK I used an extremely
dirty hack (See attached Portfile).
The reason for this is that enabling '-isysroot $SDK_path' treats all other
includes as SDK relative path. I don't know how to get around that, so I
used a dirty hack (copied from http://dev.ultravelours.com/ports/enblend/)
and symlinked the '/opt' directory (default MacPorts installation prefix is
the standard '/opt/local') from the SDK root directory (and deleted it later
in the process). You can find that in the attached portfile.

See for the explanation at:
http://lists.apple.com/archives/darwin-dev/2006/Apr/msg00042.html


The only other way to get cairo compiled universally is to change the one
line in the Portfile. It's the line:
set my_cflags "${configure.cflags} -isysroot ${sysroot} ${my_arch_flag}"

to

set my_cflags "${configure.cflags} ${my_arch_flag}"

That works too and is much simpler, but it does not give you the possibility
to choose your SDK (however when compiling i386 and ppc, the MacOSX10.4u.sdk
is always used, or isn't it)


Harry
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-users/attachments/20080801/299ec568/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Portfile
Type: application/octet-stream
Size: 6146 bytes
Desc: not available
Url : http://lists.macosforge.org/pipermail/macports-users/attachments/20080801/299ec568/attachment.obj 


More information about the macports-users mailing list