PREREQUISITES
-------------
First, install XCode, MacPorts, and its dependencies required for building Tux
Paint.  These are described in the macos/README.txt file in the Tux Paint
source code.

Additionally, the following MacPorts package is required:

  fltk-devel
  libunibreak^*

  ^* Not available from MacPorts as of this writing, see below.

libunibreak

   libunibreak is not available from MacPorts as of this writing.
   It can be installed from the source code as follows. It should be
   installed to /opt/local (same as MacPorts) for the library to be
   included in TuxPaint-Config.dmg.

     $ sudo port install autoconf automake libtool
     $ git clone https://github.com/adah1972/libunibreak.git
     $ cd libunibreak
     $ ./bootstrap
     $ ./configure --prefix=/opt/local
     $ make && sudo make install

   WARNING: Having any UNIX-like toolset installed on your Mac besides
   MacPorts and Xcode, such as Fink or Brew, will prevent your app
   bundle from being portable. Be sure Fink and Brew are not accessible
   from your build environment.


HOW TO BUILD
------------
Simply, run the following commands:

  % make macos                # build the binary
  % make install-macos        # build TuxPaint-Config.app

  .. optionally, build the universal bundle (see below) ..

  % make TuxPaint-Config.dmg  # build TuxPaint-Config.dmg for distribution


BUILDING THE UNIVERSAL BUNDLE
-----------------------------
To build the universal bundle:

  1. Build TuxPaint-Config.app on the Intel version of macOS.  Rename it to
     TuxPaint-Config-x86_64.app.

  2. Build TuxPaint-Config.app on the Apple Silicon version of macOS.  Rename it
     to TuxPaint-Config-arm64.app.

  3. Copy TuxPaint-Config-x86_64.app to the Apple Silicon version of macOS, to
     the same directory as TuxPaint-Config-arm64.app.

  4. Run `macos/build-universal.sh` to combine the two versions of the app
     bundles into the Universal Bundle, TuxPaint-Config.app


BACKWARD COMPATIBILITY
----------------------
As with Tux Paint, Tux Paint Config built on a specific version of macOS only
works on that version of macOS and later.  To build a binary that is as
backward compatible as possible, build Tux Paint Config on the oldest version
of macOS available to you, or build all MacPorts libraries from the source code
as described in the Tux Paint's docs/[locale]/INSTALL.txt document.

