Building GIMP 1.2.5 on MacOS X 10.3 (Panther)

My name is Mat Caughron and I volunteer my time for the MacGIMP project, which is a collaborative effort to bring the gimp toolkit (GTK) and the GIMP to Mac OS X.

The intensity of efforts to bring the latest GIMP to Mac OS X have made it hard to stop long enough to write up helpful documentation, but over Thanksgiving weekend, one free day presented itself and so decided to use it to write up a general description of the build process. Hopefully this will encourage other Mac developers and enthusiasts to get involved and help out. There is a great need for documentation among various open source projects including the GIMP and this need will only increase as more Mac users get on board. Be assured that your suggestions for improving this document and any corrections will not be turned away.

The price of the official MacGIMP CD seems to be a frequent topic of discussion. Many GNU/Linux users are not accustomed to paying for their software as they download the source directly and built it themselves or have a package manager take care of this task for them. Mac users, on the other hand, have a long tradition of willingness to support the developers who work on Mac software, by paying shareware authors or simply purchasing commercial applications. As Apple attracts more Linux users, this topic will likely come up again in the future. Our position is as follows: GTK and the GIMP are open source and will remain so. This means that the source will remain open and available, as is consistent with the GNU Public License. However, your time and the time of your employees and the time of your coworkers and of your management is not free. Indeed, the time of skilled workers is worth very real money. There exists a genuine opportunity for companies to provide value in the open source arena by providing streamlined packages which to provide well-defined functionality. One example of this is Cisco who sells pre-configured Linux kernels in their Linksys wireless access point devices.

Let's take a look at an example: a hardwood floor company wants to advertise goods and services on the internet. The company ABC Hardwood Floors hires a web site developer (who happens to like free software) to take pictures of the different kinds of wood grains and projects completed to put in an online photo album to show to prospective customers. This information worker, also a graphic artist and a Mac user, is being paid $50 per hour and expects to complete the project in 50 hours. If she spends three hours finding all of the libraries needed, then building and trouble-shooting the GIMP on her Macintosh (not an unlikely scenario) then the three hours spent represents $150 that the "free" software cost the project. On the other hand, if an installer exists that is easy to find and download for $50 that lets her be ready to edit the images in 30 minutes, then $75 real dollars were saved. Note that the free software brought to the project actually increased by there being an installer for sale for $50.

As the MacGIMP project, RedHat and others have shown, it is possible for both models to exist in parallel: open source and paid software. Mac users who want to install a compiler and build the GIMP with all of its libraries as we describe here, can have the software at no cost. They are also free to contribute their modifications back to the project. On the other hand, companies who need to be ensured that there is economic benefit to assure long-term availability of the software can also be satisfied. The MacGIMP server isn't going offline because it provides economic incentive to its owners to be available on a 24x7x365 basis. A special note for GNU software advocates: in order for corporate adoption of GNU software to occur, it is helpful for there to exist corporate entities who can stand behind the product to ensure their availability. You advance the cause by promoting successful business models for GNU software. (What would happen if half your team was using the GIMP and then the other half couldn't run it because the download wasn't available?!) Archei LLC is a company formed to bring this level of availability to the GIMP project for the currently accepted corporate platforms: Apple's Mac OS X and Microsoft's Windows. .

In addition to following the instructions here, the GIMP can also be built using the Fink project or DarwinPorts package management systems. Both of these projects brings lots of additional baggage along, though. This is not necessarily good or bad, and it really depends on how you want to build your system and the strengths and weaknesses of the packaging systems. My personal preference is to minimize the need for package management systems on my Mac, as problems arise when you have conflicting packages from different projects, not to mention the limitations of disk space. Some day, the metapkg project may resolve these issues, but for now I think the best course of action is to build it yourself and/or support the project by purchasing a CD.

So let's get started building the GIMP on Panther. First of all, XDarwin or Apple's X11 and the Apple Developer Tools need to be installed first. XDarwin/X11 provides the windowing environment that all GTK applications need. The Developer Tools provides your compiler and header files that you'll need to build software. The Developer CD is included with each copy of Mac OS X or can be downloaded from developer.apple.com. The general outline of the build process is that you need to first set up your system to configure properly, second, download and install install the prequisite libraries, and then in a final step you will compile the GIMP. For each prerequisite library, you will need to obtain the source packages, and give them appropriate configuration commands, and install it in an appropriate location so it will be available in the final build step. Note that there are several levels of dependencies here, so the order in which you build the libraries is important. Also, if you are not using the default shell (bash) then be aware that some of the commands may be slightly different for you.

TIFF (tagged image file format) library


% curl -O ftp://ftp.remotesensing.org/pub/libtiff/tiff-v3.6.0.tar.gz
% tar -zxvf tiff-v3.6.0.tar.gz
% cd tiff-v3.6.0
% ./configure --noninteractive
% make
% sudo make install
% echo "Give root password as requested."
% rehash

PNG (portable network graphics) library


% open http://www.libpng.org/pub/png/libpng.html

% curl -O http://public.planetmirror.com/pub/sourceforge/libpng/libpng-1.2.5.tar.bz2

% bzcat libpng-1.2.5.tar.bz2 | tar xf -

% cd libpng-1.2.5

% sed 's/LDFLAGS=-L/LDFLAGS=-dynamiclib -L/' < scripts/makefile.macosx > Makefile

% make ZLIBLIB=/usr/lib ZLIBINC=/usr/include

% sudo make install

% echo "Give root password as requested."

% rehash

JPEG (joint photographic experts group) library


% open http://www.ijg.org

% curl -O http://www.ijg.org/files/jpegsrc.v6b.tar.gz

% tar -xzvf jpegsrc.v6b.tar.gz

% cd jpegsrc.v6b

% cp /usr/share/libtool/config.guess .

% cp /usr/share/libtool/config.sub .

% mv ltmain13 ltmain13-backup

% mv ltconfig13 ltconfig13-backup

% curl -O http://www.macgimp.org/ltmain13

% curl -O http://www.macgimp.org/ltconfig13

% ./configure --enable-shared --enable-static

% make

% sudo make install

% echo "Give root password as requested."

% rehash

GTK+ (gimp toolkit) library


% setenv CPPFLAGS -no-cpp-precomp

% curl -O ftp://ftp.gtk.org/pub/gtk/v1.2/gtk+-1.2.10.tar.gz

% tar -zxvf gtk+-1.2.10.tar.gz

% cd gtk+-1.2.10

% cp /usr/share/libtool/config.guess .

% cp /usr/share/libtool/config.sub .

% mv ltmain13 ltmain13-backup

% mv ltconfig13 ltconfig13-backup

% curl -O http://www.macgimp.org/ltmain13

% curl -O http://www.macgimp.org/ltconfig13

% ./configure --enable-shared --enable-static

% make

% sudo make install

% echo "Give root password as requested."

% rehash

glib


% curl -O ftp://ftp.gtk.org/pub/gtk/v1.2/glib-1.2.10.tar.gz

% tar -zxvf glib-1.2.10.tar.gz

% cd glib-1.2.10

% cp /usr/share/libtool/config.guess .

% cp /usr/share/libtool/config.sub .

% mv ltmain13 ltmain13-backup

% mv ltconfig13 ltconfig13-backup

% curl -O http://www.macgimp.org/ltmain13

% curl -O http://www.macgimp.org/ltconfig13

% ./configure --enable-shared --enable-static

% make

% sudo make install

% echo "Give root password as requested."

% rehash

Building GIMP 1.2.5


% open ftp://ftp.gimp.org/pub/gimp/v1.2/v1.2.5/README

% open http://www.gimp.org/stable_ver.html

% curl -O ftp://ftp.gimp.org/pub/gimp/v1.2/v1.2.5/gimp-1.2.5.tar.bz2

% bunzip2 gimp-1.2.5.tar.bz2

% tar -xvf gimp-1.2.5.tar

% cd gimp-1.2.5

% make --with-mp

% sudo make install

% echo "Give root password as requested."

    At this point the GIMP is built and installed. You should now launch the X11 application or XDarwin and type the following commands into an xterm, which is the name for the terminal window under XFree86. Under Apple's X11, quartz-wm will provide a new xterm window for you when you hit the Apple(command)-N keystroke. XDarwin automatically gives you an xterm by default when you run it, and you can get another xterm by typing xterm & in a window.

    There are a variety of ways to launch the GIMP. There is a MacGIMP Launcher application that you can put in your dock. You can add a shortcut to Apple's window manager application. You can open a terminal window every time and do it yourself. The following commands are intended to be useful to illustrate the steps necessary for launching the GIMP from a terminal window.

Tips for launching and running the GIMP


% open /Applications/X11.app

% echo "To set your locale, enter a string like the following: setenv LANG en.US "

% setenv LANG en.US

% echo "If XDarwin or X11 are not giving you permission to open a window, use xhost to set appropriate permissions and set your DISPLAY environment appropriately."

% /usr/X11R6/bin/xhost +127.0.0.1

% setenv DISPLAY :0.0

% echo "This alias will provide you with a keyboard shortcut for running the gimp."

% alias macgimp '/usr/local/bin/gimp --no-shm --no-xshm'

% macgimp &

Installing Extras


% curl -O ftp://ftp.gimp.org/pub/gimp/v1.2/v1.2.5/gimp-data-extras-1.2.0.tar.bz2
arrow
arrow
    全站熱搜

    Bluelove1968 發表在 痞客邦 留言(0) 人氣()