diff -ruN xfig.3.2.5/Imakefile xfig.3.2.5-patched/Imakefile --- xfig.3.2.5/Imakefile 2006-10-10 16:19:22.000000000 -0700 +++ xfig.3.2.5-patched/Imakefile 2007-05-11 17:36:09.000000000 -0700 @@ -30,9 +30,9 @@ XCOMM Also, you may have to uncomment and redefine MKDIRHIER because "make" looks XCOMM for it relative to the BINDIR variable. XCOMM -BINDIR = /usr/bin -XCOMM MKDIRHIER = /bin/sh /usr/bin/X11/mkdirhier -p -MKDIRHIER = mkdirhier +BINDIR = $(PREFIX)/bin +MKDIRHIER = /bin/sh /usr/X11R6/bin/mkdirhier +XCOMM MKDIRHIER = mkdirhier XCOMM Uncomment and change XAPPLOADDIR to the directory where you want the XCOMM app-defaults resource files to go. You will have to use the environment @@ -45,7 +45,7 @@ XCOMM different tree than the "correct" tree that your X system expects. The usual XCOMM purpose of DESTDIR is to test an install process by installing in a benign area. -XCOMM XAPPLOADDIR = /home/user/xfig +XAPPLOADDIR = $(PREFIX)/etc/app-defaults XCOMM Uncomment the following definition for XAW3D if you want to use XCOMM the 3d Athena Widget Set (highly recommended!) @@ -55,11 +55,11 @@ XCOMM Uncomment the following if you have David Hawkey's Xaw3D version 1.5E which has XCOMM some new features, including "Tips", which replace xfig's "help balloons" -XCOMM #define XAW3D1_5E +#define XAW3D1_5E #ifdef XAW3D1_5E DUSEXAW3D = -DXAW3D -DXAW3D1_5E - XAWLIB = -lXaw3d15e + XAWLIB = -lXaw3d #else XAW_SRC = w_menuentry.c SmeCascade.c SmeBSB.c SimpleMenu.c XAW_OBJ = w_menuentry.o SmeCascade.o SmeBSB.o SimpleMenu.o @@ -72,8 +72,8 @@ XCOMM Redefine the following if your PNG library, zlib library and/or include file XCOMM are in different places -PNGLIBDIR = $(USRLIBDIR) -PNGINC = -I/usr/local/include +PNGLIBDIR = $(PREFIX)/lib +PNGINC = -I$(PREFIX)/include ZLIBDIR = $(USRLIBDIR) XCOMM If don't want JPEG support, comment out the #define USEJPEG line @@ -93,8 +93,8 @@ #ifdef USEJPEG #ifdef USEINSTALLEDJPEG -JPEGLIBDIR = /usr/local/lib -JPEGINC = -I/usr/include/X11 +JPEGLIBDIR = $(PREFIX)/lib +JPEGINC = -I$(PREFIX)/include #else JPEGLIBDIR = ../jpeg JPEGINC = -I$(JPEGLIBDIR) @@ -116,8 +116,8 @@ #define USEXPM_ICON #ifdef USEXPM -XPMLIBDIR = /usr/local/lib -XPMINC = -I/usr/local/include/X11 +XPMLIBDIR = /usr/X11R6/lib +XPMINC = -I/usr/X11R6/include/X11 #endif XCOMM Uncomment the following definiton if you want to use the small icons @@ -163,14 +163,14 @@ XCOMM use (and change) the following if you want the multi-key data base file XCOMM somewhere other than the standard X11 library directory XCOMM be sure to comment out the second copy of XFIGLIBDIR if you use this one -XCOMM XFIGLIBDIR = $(LIBDIR) +XFIGLIBDIR = $(PREFIX)/share/xfig XCOMM use this if you want the multi-key data base file in the standard X11 tree -XFIGLIBDIR = $(LIBDIR)/xfig +XCOMM XFIGLIBDIR = $(LIBDIR)/xfig XCOMM XFIGDOCDIR tells where the html and pdf documentation should go -XCOMM XFIGDOCDIR = $(DOCDIR)/xfig -XFIGDOCDIR = /usr/local/xfig/doc +XFIGDOCDIR = $(PREFIX)/share/doc/xfig +XCOMM XFIGDOCDIR = /usr/local/xfig/doc XCOMM MANDIR tells where the standard man pages should go (no need to change it XCOMM if you want the man pages installed in the standard place on your system diff -Nurd -x'*~' xfig.3.2.5-alpha5.orig/f_util.c xfig.3.2.5-alpha5/f_util.c --- xfig.3.2.5-alpha5.orig/f_util.c 2004-01-06 14:46:08.000000000 -0500 +++ xfig.3.2.5-alpha5/f_util.c 2005-10-26 02:17:42.000000000 -0400 @@ -782,7 +782,7 @@ else strcpy(dirname, "."); if (access(dirname, W_OK) == 0) { /* OK - the directory is writable */ - sprintf(unc, "gunzip -q %s", name); + sprintf(unc, "gunzip -q -- %s", name); if (system(unc) != 0) file_msg("Couldn't uncompress the file: \"%s\"", unc); strcpy(name, plainname); @@ -793,7 +793,7 @@ sprintf(tmpfile, "%s%s", TMPDIR, c); else sprintf(tmpfile, "%s/%s", TMPDIR, plainname); - sprintf(unc, "gunzip -q -c %s > %s", name, tmpfile); + sprintf(unc, "gunzip -q -c -- %s > %s", name, tmpfile); if (system(unc) != 0) file_msg("Couldn't uncompress the file: \"%s\"", unc); file_msg ("Uncompressing file %s in %s because it is in a read-only directory", --- xfig.3.2.5/fig.h 2006-02-24 12:15:16.000000000 -0800 +++ xfig.3.2.5-patched/fig.h 2007-05-12 10:07:56.000000000 -0700 @@ -383,6 +383,9 @@ extern long random(); extern void srandom(unsigned int); +#elif defined(__DARWIN__) +extern void srandom(); + #elif !defined(__osf__) && !defined(__CYGWIN__) && !defined(linux) extern void srandom(int); diff -ruN xfig.3.2.5/w_keyboard.c xfig.3.2.5-patched/w_keyboard.c --- xfig.3.2.5/w_keyboard.c 2004-11-09 13:10:22.000000000 -0800 +++ xfig.3.2.5-patched/w_keyboard.c 2007-05-28 08:24:15.000000000 -0700 @@ -37,6 +37,10 @@ #define REG_NOERROR REG_OKAY #endif +#ifndef REG_NOERROR +#define REG_NOERROR 0 +#endif + Boolean keyboard_input_available = False; int keyboard_x; int keyboard_y; diff -ruN xfig.3.2.5/w_library.c xfig.3.2.5-patched/w_library.c --- xfig.3.2.5/w_library.c 2006-04-03 09:27:30.000000000 -0700 +++ xfig.3.2.5-patched/w_library.c 2007-05-28 10:11:06.000000000 -0700 @@ -1029,8 +1029,8 @@ Widget menu, entry; #ifndef XAW3D1_5E Widget submenu; - char submenu_name[200]; #endif /* XAW3D1_5E */ + char submenu_name[200]; char menu_name[200]; int i;