1 TITLE: Xfig and Transfig
3 LFS VERSION: 4.1, but probably anything with gcc >= 2.95.3
5 AUTHOR: Uli Fahrenberg <uli at math dot auc dot dk>
8 Installing Xfig and Transfig in /usr
12 Xfig is a powerful drawing program especially useful for schematic drawings,
13 and Transfig is the image format conversion tool that goes with it. Xfig
14 depends on Transfig, but Transfig can be used as a standalone tool, too. This
15 hint covers installation of them both, and we tweak the Imakefiles to make
16 them install in the /usr hierarchy, instead of /usr/X11R6 and /usr/local.
21 xfig.3.2.4.full.tar.gz and transfig.3.2.4.tar.gz from
23 http://www.xfig.org/xfigdist/
42 Transfig will utilize:
47 I install Xfig first, but the order most probably doesn't matter. The variable
48 XFIGLIBDIR is used in both programs' Imakefiles and should point to the same
49 directory, so for consistency I declare it first:
51 XFIGLIBDIR=/usr/share/xfig
54 So now for the Xfig installation. If your X is too old and does not contain
55 Xpm, leave out the USEXPM stuff below, or install Xpm separately before (or
59 echo MANDIR=/usr/share/man/man1 > Imakefile
60 cat Imakefile.orig | sed "s:XCOMM BINDIR = /usr/bin/X11:BINDIR=/usr/bin:g" \
61 | sed "s:XCOMM MKDIRHIER = /bin/sh /usr/bin/X11/mkdirhier:MKDIRHIER=$(type -p mkdirhier):g" \
62 | sed "s:XCOMM #define USEXPM:#define USEXPM:g" \
63 | sed "s:XFIGLIBDIR = \$(LIBDIR)/xfig:XFIGLIBDIR=$XFIGLIBDIR:g" \
64 | sed "s:XFIGDOCDIR = \$(LIBDIR)/xfig:XFIGDOCDIR=/usr/share/doc/xfig:g" \
71 Note: This will install some html and pdf documentation of Xfig, some of
72 it in Japanese. If you want to avoid the japanese stuff, replace the
73 `make install.all' above with
81 Leave out the last one if you're not interested in html documentation at all.
83 If your compilation bails out at SimpleMenu.c, you most probably do not have
84 Xaw3d installed. Don't worry, you don't need Xaw3d (not for Xfig, that is).
85 SimpleMenu.c wants to include some Xaw3d headers, but the original Xaw ones
86 will do fine. Do the following to your Xfig sources and you should be going
89 mv SimpleMenu.c{,.orig}
90 sed 's:#include <X11/Xaw3d/:#include <X11/Xaw/:g' SimpleMenu.c.orig \
94 Thanks to Ken Moffat for the info. Note that not only will Xfig do fine with
95 Xaw instead of Xaw3d, it even seems to look the same regardless of which
99 OK, here we go with transfig. The DDA4 = -DA4 stuff is because I use DIN A4
100 paper, leave it out if you don't. For Xpm see above. The DDEPSFIG and
101 USELATEX2E sed's are useful only if you use LaTeX and partly influenced by my
102 personal tastes. Read the Imakefiles for further info (hint: There's graphicx
103 support too (and if you copy my instructions, you'll get both graphicx and
107 echo BINDIR=/usr/bin > Imakefile
108 echo MANDIR=/usr/share/man/man1 >> Imakefile
109 cat Imakefile.orig >> Imakefile
110 mv fig2dev/Imakefile{,.orig}
111 echo BINDIR=/usr/bin > fig2dev/Imakefile
112 echo MANDIR=/usr/share/man/man1 >> fig2dev/Imakefile
113 cat fig2dev/Imakefile.orig | \
114 sed "s:/usr/local/lib/X11/xfig:$XFIGLIBDIR:g" \
115 | sed "s:XCOMM #define USEXPM:#define USEXPM:g" \
116 | sed "s:XCOMM DDA4 = -DA4:DDA4 = -DA4:g" \
117 | sed "s:XCOMM DDEPSFIG = -DEPSFIG:DDEPSFIG = -DEPSFIG:g" \
118 | sed "s:FIG2DEV_LIBDIR = /usr/local/lib/fig2dev:FIG2DEV_LIBDIR=/usr/share/transfig:g" \
120 mv transfig/Imakefile{,.orig}
121 echo BINDIR=/usr/bin > transfig/Imakefile
122 echo MANDIR=/usr/share/man/man1 >> transfig/Imakefile
123 cat transfig/Imakefile.orig | \
124 sed "s:XCOMM USELATEX2E = -DLATEX2E:USELATEX2E = -DLATEX2E:g" \
125 >> transfig/Imakefile