The Artima Developer Community
Sponsored Link

Agile Buzz Forum
Getting Cairo on your Mac

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
James Robertson

Posts: 29924
Nickname: jarober61
Registered: Jun, 2003

David Buck, Smalltalker at large
Getting Cairo on your Mac Posted: Apr 12, 2007 5:34 PM
Reply to this message Reply

This post originated from an RSS feed registered with Agile Buzz by James Robertson.
Original Post: Getting Cairo on your Mac
Feed Title: Travis Griggs - Blog
Feed URL: http://www.cincomsmalltalk.com/rssBlog/travis-rss.xml
Feed Description: This TAG Line is Extra
Latest Agile Buzz Posts
Latest Agile Buzz Posts by James Robertson
Latest Posts From Travis Griggs - Blog

Advertisement

I've had a number of people ask me how I use Cairo on my Mac. There is of course the method of using git to upload the source tree and autoconfig/make it yourself. This is not generally how most want to use it from a consumer point of view. And in fact I rarely do. I usually the method described below.

1. Get Macports

Macports is the newly named version of Darwinports. It is like Gentoo for Linux. I have a number of very handy command line tools and XWindows tools which I get from the ports project. You should just be able to download the latest macports binary and be set to go.

There's a wiki site there with additional help. And the irc channel (irc.freenode.net#macports) is pretty helpful too.

2. Update Macports

From a command line execute the following:
sudo port selfupdate
This will make sure that a) your ports system is up to date b) your snapshot of available packages is up to date. You can do this from time to time.

3. Install Cairo

From a command line execute the following:
sudo port install cairo +quartz +atsui
This will download cairo and any other dependent packages. It will take some time to install, since it compiles them locally. If you only want to use cairo under X11 apps, you can skip the +quartz/+atsui options.

4. Update Environment

By default, macports puts things in /opt/local directories. The install may or may not update your $PATH so that you can run programs installed via ports. But it doesn't seem to update the library path. To effect this, edit your local .profile file to include these three lines:
export PATH=/opt/local/bin:/opt/local/sbin:$PATH
export DYLD_LIBRARY_PATH=/opt/local/lib:$DYLD_LIBRARY_PATH
export LIBRARY_PATH=/opt/local/lib:$LIBRARY_PATH

5. Load Cairographics Package

Fire up VisualWorks (you need to restart it after making the change above if its running already). And then load Cairographics package from the OpenRepository. If you run under X11, then it should just work. If you run under aqua, there's issues with drawing to a window, but drawing to Pixmaps seems to work fine. I'm working out these drawing to a window issues currently (issues are two: 1) resizing the window tanks VW, 2) ever cairo drawing optiion must be followed by a notification to the VM to cast the changes up to the window).

Read: Getting Cairo on your Mac

Topic: The Best Error Checking is Usage Previous Topic   Next Topic Topic: StS 2007 Daily: Cincom Smalltalk Roadmap

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use