[33558] trunk/dports/graphics/xfig
pguyot at kallisys.net
pguyot at kallisys.net
Tue Jan 29 23:34:14 PST 2008
Revision: 33558
http://trac.macosforge.org/projects/macports/changeset/33558
Author: pguyot at kallisys.net
Date: 2008-01-29 23:34:09 -0800 (Tue, 29 Jan 2008)
Log Message:
-----------
graphics/xfig: fixing crash when accessing the menu bar (bug #12044)
Modified Paths:
--------------
trunk/dports/graphics/xfig/Portfile
trunk/dports/graphics/xfig/files/patch-Imakefile
trunk/dports/graphics/xfig/files/patch-fig.h
Added Paths:
-----------
trunk/dports/graphics/xfig/files/patch-f_util.c
trunk/dports/graphics/xfig/files/patch-w_library.c
Modified: trunk/dports/graphics/xfig/Portfile
===================================================================
--- trunk/dports/graphics/xfig/Portfile 2008-01-30 05:50:55 UTC (rev 33557)
+++ trunk/dports/graphics/xfig/Portfile 2008-01-30 07:34:09 UTC (rev 33558)
@@ -3,7 +3,7 @@
PortSystem 1.0
name xfig
version 3.2.5
-revision 1
+revision 2
categories graphics x11
maintainers pguyot at kallisys.net
description Facility for Interactive Generation of figures under X11
@@ -31,7 +31,9 @@
use_xmkmf yes
patchfiles patch-Imakefile \
patch-fig.h \
- patch-w_keyboard.c
+ patch-f_util.c \
+ patch-w_keyboard.c \
+ patch-w_library.c
post-patch {
reinplace "s|__PREFIX|${prefix}|g" ${worksrcpath}/Imakefile
reinplace "s|__DESTROOT|${destroot}|g" ${worksrcpath}/Imakefile
@@ -40,7 +42,7 @@
post-destroot {
# Remove the /usr/X11R6/lib/X11/app-defaults symlink
# (this could be done by handling symlinks better on images)
- file delete "${destroot}/usr/X11R6/lib/X11/app-defaults"
+ file delete ${destroot}/usr/X11/lib/X11/app-defaults
}
livecheck.check regex
Modified: trunk/dports/graphics/xfig/files/patch-Imakefile
===================================================================
--- trunk/dports/graphics/xfig/files/patch-Imakefile 2008-01-30 05:50:55 UTC (rev 33557)
+++ trunk/dports/graphics/xfig/files/patch-Imakefile 2008-01-30 07:34:09 UTC (rev 33558)
@@ -1,15 +1,42 @@
---- Imakefile.orig 2006-10-11 08:19:22.000000000 +0900
-+++ Imakefile 2007-04-14 23:36:43.000000000 +0900
-@@ -30,7 +30,8 @@
+--- Imakefile.orig 2007-11-07 09:35:59.000000000 +0100
++++ Imakefile 2007-11-07 09:37:22.000000000 +0100
+@@ -30,9 +30,10 @@
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
+DESTDIR = __DESTROOT
- XCOMM MKDIRHIER = /bin/sh /usr/bin/X11/mkdirhier -p
- MKDIRHIER = mkdirhier
++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 +46,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/lib/X11/app-defaults
+
+ XCOMM Uncomment the following definition for XAW3D if you want to use
+ XCOMM the 3d Athena Widget Set (highly recommended!)
+@@ -55,11 +56,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,9 +73,9 @@
XCOMM Redefine the following if your PNG library, zlib library and/or include file
XCOMM are in different places
@@ -34,6 +61,17 @@
#else
JPEGLIBDIR = ../jpeg
JPEGINC = -I$(JPEGLIBDIR)
+@@ -116,8 +117,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
@@ -166,16 +167,16 @@
XCOMM XFIGLIBDIR = $(LIBDIR)
Added: trunk/dports/graphics/xfig/files/patch-f_util.c
===================================================================
--- trunk/dports/graphics/xfig/files/patch-f_util.c (rev 0)
+++ trunk/dports/graphics/xfig/files/patch-f_util.c 2008-01-30 07:34:09 UTC (rev 33558)
@@ -0,0 +1,20 @@
+--- f_util.c.orig 2007-11-06 17:30:11.000000000 +0100
++++ f_util.c 2007-11-06 17:31:43.000000000 +0100
+@@ -781,7 +781,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);
+@@ -792,7 +792,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",
Modified: trunk/dports/graphics/xfig/files/patch-fig.h
===================================================================
--- trunk/dports/graphics/xfig/files/patch-fig.h 2008-01-30 05:50:55 UTC (rev 33557)
+++ trunk/dports/graphics/xfig/files/patch-fig.h 2008-01-30 07:34:09 UTC (rev 33558)
@@ -1,11 +1,11 @@
---- fig.h.orig 2007-04-15 07:40:32.000000000 +0900
-+++ fig.h 2007-04-15 07:41:02.000000000 +0900
-@@ -383,7 +383,7 @@
+--- fig.h.orig 2007-11-06 17:31:17.000000000 +0100
++++ fig.h 2007-11-06 17:31:57.000000000 +0100
+@@ -383,6 +383,9 @@
extern long random();
extern void srandom(unsigned int);
--#elif !defined(__osf__) && !defined(__CYGWIN__) && !defined(linux)
-+#elif !defined(__osf__) && !defined(__CYGWIN__) && !defined(linux) && !defined(__DARWIN__)
++#elif defined(__DARWIN__)
++extern void srandom();
++
+ #elif !defined(__osf__) && !defined(__CYGWIN__) && !defined(linux)
extern void srandom(int);
-
- #endif
Added: trunk/dports/graphics/xfig/files/patch-w_library.c
===================================================================
--- trunk/dports/graphics/xfig/files/patch-w_library.c (rev 0)
+++ trunk/dports/graphics/xfig/files/patch-w_library.c 2008-01-30 07:34:09 UTC (rev 33558)
@@ -0,0 +1,13 @@
+--- w_library.c.orig 2007-11-06 16:39:32.000000000 +0100
++++ w_library.c 2007-11-06 16:40:16.000000000 +0100
+@@ -1029,9 +1029,9 @@
+ Widget menu, entry;
+ #ifndef XAW3D1_5E
+ Widget submenu;
+- char submenu_name[200];
+ #endif /* XAW3D1_5E */
+ char menu_name[200];
++ char submenu_name[200];
+ int i;
+
+ menu = XtCreatePopupShell(name, simpleMenuWidgetClass,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20080129/c931beb3/attachment.html
More information about the macports-changes
mailing list