XFig on Solaris 10

[Image]
Part of the XFig user interface

About XFig

XFig is a powerful vector drawing program for UNIX and Mac. XFig is especially useful for drawing electrical schematics, class diagrams and illustrations to be used in LaTeX documents.

XFig is controlled by simple key strokes and three mouse buttons. With the help of the key commands and mouse buttons, you can paint vector images without wasting time on toolbars and fancy icons. With XFig, you can concentrate all your effort on the image itself. All the drawing tools are at your fingertips and you can keep your eyes fixed to the image. How many hours of unproductive work have you spent in stupid drawing programs that force you to move the mouse pointer and look at some fancy icon just to change the drawing tool?

Getting XFig

Prerequisites

Sun Studio

In order to compile XFig, you will need Sun Studio 12 compiler. The compiler can be downloaded free of charge from Sun.com.

Download the compiler and install it as root using the interactive installer

bunzip2 -c SunStudio12ml-solaris-x86-200709-pkg.tar.bz2 | tar xf -
./installer

Check for missing prerequisites as root

./prepare_system -C

If needed, install or update netbeans, or any other piece of software identified by prepare_system as root

./prepare_system -s netbeans

Done

3D Athena Widgets

XFig uses 3D Athena Widget set for its graphical user interface. If you have not installed the Athena Widget set already, then download Xaw3D package from Sun Freeware.

Install xaw3d as root

bunzip2 SFWxaw3d.pkg.bz2
pkgadd -d SFWxaw3d.pkg 
Done

XFig

Get XFig source package

umask 022
wget http://files.xfig.org/xfig.3.2.5.full.tar.gz
gunzip -c xfig.3.2.5.full.tar.gz | tar xf -
cd xfig.3.2.5/

Patch for Solaris 10

wget http://softagalleria.net/download/xfig/xfig-3.2.5.diff
gpatch -p1 -i xfig-3.2.5.diff

Compile

xmkmf
make

Login as root, cd to the package directory and install

make install.all
Done

Transfig

You will need transfig in order to convert XFig images to other image formats. With transfig, you can create PostScript images out of your XFig images and embed the images into your LaTeX documents, for example.

Get transfig source

wget http://www.xfig.org/software/xfig/3.2.5/transfig.3.2.5.tar.gz
gunzip -c transfig.3.2.5.tar.gz | tar xf -
cd transfig.3.2.5/

Patch for Solaris 10

wget http://softagalleria.net/download/xfig/transfig-3.2.5.diff
gpatch -p1 -i transfig-3.2.5.diff

Compile

xmkmf
make Makefiles
make

Login as root, cd to the package directory and install as root

make install
Done

netpbm

Netpbm is a toolkit for manipulating graphic images. You will need netpbm to create GIF and JPEG images with XFig and transfig. If you do not need GIF or JPEG support, then you may skip this section.

Download netpbm source

wget http://downloads.sourceforge.net/netpbm/netpbm-10.26.52.tgz
gunzip -c netpbm-10.26.52.tgz | tar xf -
cd netpbm-10.26.52

Patch for Solaris 10

wget http://softagalleria.net/download/xfig/netpbm-10.26.52.diff
gpatch -p1 -i netpbm-10.26.52.diff

Compile

gmake
gmake package

Login as root, cd to the netpbm directory and install as

./installnetpbm

The installation program is interactive. When asked for the install package location, press enter to accept the default location /tmp/netpbm and specify /opt/netpbm-10.26.52 as the install prefix. Accept all the other options with enter.

Done

Install XFig

In order to use XFig, execute the following commands to modify your .login file (execute these commands as yourself, not as root)

cat >> $HOME/.login <<'EOF'
PATH=$PATH:/opt/netpbm-10.26.52/bin
MANPATH=$MANPATH:/opt/netpbm-10.26.52/man

PATH=$PATH:/opt/xfig-3.2.5/bin
MANPATH=$MANPATH:/opt/xfig-3.2.5/man
XUSERFILESEARCHPATH=/opt/xfig-3.2.5/app-defaults/%N

export XUSERFILESEARCHPATH MANPATH PATH
EOF

Log out to re-read the .login file. When you log back in, XFig should open with the command xfig.

Complete

Version History

Sep 5, 2008: Updated the patch file to compile cleanly on Solaris 10 u5. Thanks to Gerard Henry for the fix!

Apr 7, 2008: Compiled succesfully on Solaris 10 u4.