Tux Paint on OSX :)

Well, thanks to GCC and a lot of patience,
I was able to get Tux Paint to run under Mac OS X,
sounds, rubber stamps and all!

(Well, not QUITE all; I didn’t bother setting up
gettext(), so translations don’t work.)

I’m not sure if/how to statically link any of this
to release an easy-to-use prebuilt version, but
at least I’ve proven it CAN be done. :^)

Now… any actual OS X developers feel like
adopting Tux Paint for this platform? :slight_smile:

(I’m also still in need of a maintainer/packager/
what-have-you for Mac OS ‘classic’)




BTW - Here are the notes I took to get Tux Paint working on Mac OS X using
GCC and various libraries (SDL, FreeType, PNG) from source:

(Tux Paint is available at: http://www.newbreedsoftware.com/tuxpaint/ )

NOTE: I installed all of these libraries, and Tux Paint itself, into
my friend’s home directory, under:


By default, these libraries and such are set up to go to:


Unless otherwise noted (e.g., libPNG), I simply configured the libraries with:

./configure --prefix=/Users/leng/tp/local

Also note: For “./configure” scripts and Makefiles to find configuration
programs like “sdl-config”, I thusly needed to add "/Users/leng/tp/local/bin"
to the $PATH environment variable. (I used ‘setenv’ since default shell
on OS X is TCSH, not Bash.)

  • SDL_ttf complained about “FT_Face_New” function missing.
    Turned out to be a problem with FreeType2 thinking Mac OS X is Mac OS, not BSD

    Solution is explained here:

  • libPNG doesn’t used autoconf (no “./configure” script),
    so I copied “./scripts/makefile.macosx” into “./makefile” and
    edited it to use “/Users/leng/tp/local” for its ${PREFIX} variable

  • libPNG failed to build due to this error:

    cc: -current_version only allowed with -dynamiclib

    I just added “-dynamiclib” to the line in the ‘makefile’ that mentioned
    "-current_version" ;^)

  • libPNG barfed when it tried to link to system-wide version of “libz”,
    so I built it locally (into “/Users/leng/tp/local”).

    I had to alter “makefile” again to set "ZLIBLIB"a nd "ZLIBINC"

  • Tux Paint had a few issues itself:

    • Couldn’t find "libintl.h"
      I decided to ignore localization stuff (it was getting late :^) ),
      so I merely commented out that “#include” in ./src/tuxpaint.c

    • Couldn’t find libPNG header files.
      I had to add “-I/Users/leng/tp/local/include” to Tux Paint’s Makefile.

    • “gettext()” function wasn’t defined.
      As mentioned above, I’m ignoring l10n stuff, so I simply made a macro:

      #define gettext(String) String

    • “bindtextdomain()” and “textdomain()” functions couldn’t be found.
      I simply made empty void functions for these. (I suppose I could have
      just as easily commented out the function calls themselves.)

    • Link errors occured about “png…” and “FT…”.
      I discovered I had to add “-lpng” and “-lfreetype” to the link command
      in Tux Paint’s Makefile. (I just stuck them after the “-lm”)

    • Errors about “libz” - again, it was going for the system-wide one that
      came with Mac OS X (or came with SOMETHING), so I pointed it to the
      local one I just installed into /Users/leng/tp/local by simply
      throwing “-lz” on the link command in Tux Paint’s Makefile.

    • Finally, there were errors about QuickTime; they were an artifacte of
      using SDL_Mixer. All I needed to do was add "-framework Quicktime"
      at the end of the link command in Tux Paint’s Makefile.

  • Translation files
    "gettext" wasn’t installed, and I didn’t care about localization.
    Makefile was dying because it couldn’t find the “msgfmt” program
    (that converts “.po” files to “.mo” files).

    So, I just whipped up a little shell script and threw it in
    /Users/leng/tp/local/bin, that did this:

    touch $3

    (The msgftm command used in Makefile is “msgfmt INFILE -o OUTFILE” ;^) )

  • JPEG Support
    Finally, last but not least, I didn’t bother building libJPEG, so
    SDL_Image didn’t support JPEG format files. The titlescreen image in
    Tux Paint is a JPEG (for size considerations, since it’s 640x480),
    so I simply took a random “.png” file lying around in Tux Paint and
    copied it over “./tuxpaint/data/images/title.jpg”.

    (I know - how evil, naming a PNG file “.jpg”, but thankfully SDL_Image
    looks at the file’s magic numbers, not it’s filename extension, when
    determining how to open it. :^) )

So, anyway, that’s how I got Tux Paint working under Mac OS X using GCC and
a bunch of library sources.

It all worked, except:

  • Title screen was wrong/missing

  • Localization (i.e., languages) weren’t supported

Not so bad for having pretty much NEVER used an OS X box before. :^)

PS - I believe I link to the websites for all of the various libraries
in Tux Paint’s “./docs/INSTALL.txt” documentation.

If no one else has volunteered I’ll take it Bill. Just send me the PB (or
I can just build it
myself if you would prefer) and I’ll statically link the libs for a release.

Lucas Newman
mail2web - Check your email from the web at
http://mail2web.com/ .

Thanks for the offer. Darrell W. (who a while back
ported my games Circus Linux! and Bug Squish to Mac)
is working on it.

If you’d like to help and/or test, please sign up
for tuxpaint’s mailing list. :wink:



-bill!On Wed, Nov 06, 2002 at 08:13:58PM -0500, flea at emuscene.com wrote:

If no one else has volunteered I’ll take it Bill. Just send me the PB (or
I can just build it
myself if you would prefer) and I’ll statically link the libs for a release.