the Fink project is an effort to port
popular Unix programs to Mac OS X
Package: xfig
Version: 3.2.5
Revision: 1013
BuildDepends: libjpeg (>= 6b-3), libpng3, libtiff, xaw3d (>= 1.5-11), x11-dev, fink (>= 0.24.12), xmkmf (>= 1.0.2-3)
Depends: x11, xaw3d-shlibs (>= 1.5-11), libjpeg-bin, app-defaults, x-ghostscript-fonts, transfig-graphicx (>= 3.2.5-1008) | transfig-epsfig (>= 3.2.5-1008), libjpeg-shlibs, libpng3-shlibs, x11-shlibs
Source: http://www.xfig.org/software/%n/%v/%n.%v.full.tar.gz
Source-MD5: fae0c67a3951bd41c057deb63b6aa47a
SourceDirectory: %n.%v
PatchFile: %n.patch
PatchFile-MD5: 132f1ab681b4ef8985f0eee0d6ac2a26
PatchScript: <<
rm -f Libraries/*/*.bak
sed 's|@FINKPREFIX@|%p|g' < %{PatchFile} | patch -p1
chmod 644 CHANGES FIGAPPS LATEX.AND.XFIG README
perl -pi -e 's|XCOMM CC = /opt/SUNWspro/bin/cc|CC = cc|' Imakefile
perl -pi -e 's|-lpng|%p/lib/libpng.dylib|' Imakefile
<<
CompileScript: <<
#!/bin/sh -ev
export PATH=%p/lib/xmkmf/bin:$PATH
export IMAKEINCLUDE=-I%p/lib/X11/config
xmkmf
make PREFIX=%p CDEBUGFLAGS=-O0 w_fontpanel.o
make PREFIX=%p
<<
InstallScript: <<
#!/bin/sh -ev
export PATH=%p/lib/xmkmf/bin:$PATH
export IMAKEINCLUDE=-I%p/lib/X11/config
make install PREFIX=%p DESTDIR=%d INSTALLFLAGS=-c
make install.all PREFIX=%p DESTDIR=%d MANDIR=%p/share/man/man1 DOCDIR=%p/share/doc/xfig INSTALLFLAGS=-c
rm -Rf %d/usr
rm -Rf %d/etc
chmod 644 %i/share/doc/xfig/html/*.*
chmod 644 %i/share/doc/xfig/html/images/*.*
chmod 644 %i/share/xfig/Libraries/*/README %i/share/xfig/Libraries/*/AUTHOR %i/share/xfig/Libraries/*/LICENSE %i/share/xfig/Libraries/*/*.*
chmod 644 %i/share/xfig/Libraries/*/*/README %i/share/xfig/Libraries/*/AUTHOR %i/share/xfig/Libraries/*/LICENSE %i/share/xfig/Libraries/*/*/*.*
chmod 644 %i/share/xfig/Libraries/*/*/*/README %i/share/xfig/Libraries/*/*/*/*.*
chmod 644 %i/share/xfig/Libraries/*/*/*/*/*.fig
chmod -R a+rX %i/share/doc/xfig
chmod -R a+rX %i/share/xfig
<<
DocFiles: CHANGES FIGAPPS LATEX.AND.XFIG README
License: BSD
Description: Menu-driven tool to create graphical objects
DescPort: <<
There have been reports that this package does not compile succesfully when
xtools is intalled rather than xfree86.
Patched an 'install' command to fix installation of filenames
beginning with hyphens (may not be needed in future upstream
releases) and an internal system(gunzip) to be able to read the
installed files.
Thanks to Martin Costabel for devising a fix for the 10.6 bug reported
at http://www.mail-archive.com/fink-users@lists.sourceforge.net/msg31785.html
<<
DescPackaging: <<
XFIGLIBDIR was set to %p/share/xfig. Looks in /etc/printcap
for printer descriptions, which may not be correct for darwin or OS X.
Also, "make install" creates some empty directories in the /usr and /etc
trees so we remove them.
<<
DescUsage: <<
The environment variable XAPPLRESDIR must point to
/sw/etc/app-defaults when using this package. (This happens by default
if /sw/bin/init.* is sourced, thanks to the app-defaults package.) The
user can also specify "*customization: -color" in the .Xdefaults or
.Xresources file, to take advantage of the color support which was
compiled in.
<<
Homepage: http://www.xfig.org/
Maintainer: Dave Morrison
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 @FINKPREFIX@/lib/xmkmf/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;