mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-21 05:00:16 +00:00
Added older version of lesstif for arb
svn path=/nixpkgs/trunk/; revision=12974
This commit is contained in:
parent
781bb5a6e1
commit
9ff6ecf5dd
|
@ -0,0 +1,13 @@
|
|||
--- lesstif2-0.94.4.orig/include/Motif-2.1/XmI/XpmI.h
|
||||
+++ lesstif2-0.94.4/include/Motif-2.1/XmI/XpmI.h
|
||||
@@ -217,8 +217,8 @@
|
||||
FUNC(xpmHashSlot, xpmHashAtom *, (xpmHashTable *table, char *s));
|
||||
FUNC(xpmHashIntern, int, (xpmHashTable *table, char *tag, void *data));
|
||||
|
||||
-#define HashAtomData(i) ((void *)i)
|
||||
-#define HashColorIndex(slot) ((unsigned int)((*slot)->data))
|
||||
+#define HashAtomData(i) ((void *)(uintptr_t)i)
|
||||
+#define HashColorIndex(slot) ((uintptr_t)((*slot)->data))
|
||||
#define USE_HASHTABLE (cpp > 2 && ncolors > 4)
|
||||
|
||||
/* I/O utility */
|
|
@ -0,0 +1,11 @@
|
|||
--- lesstif2-0.95.0.orig/lib/Xm-2.1/RenderTable.c
|
||||
+++ lesstif2-0.95.0/lib/Xm-2.1/RenderTable.c
|
||||
@@ -465,7 +465,7 @@
|
||||
DEBUGOUT(_LtDebug(__FILE__, w, "_XmRenderTableFinaliseTag(%s)\n", tag));
|
||||
#if 1
|
||||
/* Experimental start */
|
||||
- if (r->dpy == 0)
|
||||
+ if (r->dpy == 0 && w)
|
||||
r->dpy = XtDisplay(w);
|
||||
/* Experimental end */
|
||||
#endif
|
|
@ -0,0 +1,24 @@
|
|||
diff -ru lesstif2-0.94.4-old/lib/Xm-2.1/XmIm.c lesstif2-0.94.4/lib/Xm-2.1/XmIm.c
|
||||
--- lesstif2-0.94.4-old/lib/Xm-2.1/XmIm.c 2004-10-20 21:32:11.000000000 +0200
|
||||
+++ lesstif2-0.94.4/lib/Xm-2.1/XmIm.c 2007-03-28 14:39:27.000000000 +0200
|
||||
@@ -133,7 +133,10 @@
|
||||
p->next = q->next;
|
||||
}
|
||||
|
||||
- XtFree((char *)stuff);
|
||||
+ /* if count!=0 then someone uses the stuff as orig_xim
|
||||
+ so unlink it but not free it */
|
||||
+ if (!stuff->count)
|
||||
+ XtFree((char *)stuff);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1060,6 +1063,8 @@
|
||||
XCloseIM(stuff->xim);
|
||||
DEBUGOUT(_LtDebug(__FILE__, w, "XCloseIM(%p)\n", stuff->xim));
|
||||
stuff->orig_xim->xim = NULL;
|
||||
+ /* stuff->orig_xim is now useless */
|
||||
+ XtFree(stuff->orig_xim);
|
||||
} else {
|
||||
DEBUGOUT(_LtDebug(__FILE__, w, "XmImCloseXIM(%p), count -> %d\n",
|
||||
stuff->xim, stuff->orig_xim->count));
|
24
pkgs/development/libraries/lesstif-0.93/default.nix
Normal file
24
pkgs/development/libraries/lesstif-0.93/default.nix
Normal file
|
@ -0,0 +1,24 @@
|
|||
args: with args ;
|
||||
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "lesstif-0.93.94";
|
||||
src = fetchurl {
|
||||
url = http://prdownloads.sourceforge.net/lesstif/lesstif-0.93.94.tar.bz2;
|
||||
sha256 = "0v4l46ill6dhhswsw1hk6rqyng98d85nsr214vhd2k0mfajpig1y";
|
||||
};
|
||||
buildInputs = [x11];
|
||||
propagatedBuildInputs = [libXp libXau];
|
||||
|
||||
# This is an older release of lesstif which works with arb.
|
||||
#
|
||||
patches = [
|
||||
./c-bad_integer_cast.patch
|
||||
./c-xim_chained_list_crash.patch
|
||||
./c-render_table_crash.patch
|
||||
./stdint.patch
|
||||
];
|
||||
meta = {
|
||||
priority = "5";
|
||||
};
|
||||
}
|
11
pkgs/development/libraries/lesstif-0.93/stdint.patch
Normal file
11
pkgs/development/libraries/lesstif-0.93/stdint.patch
Normal file
|
@ -0,0 +1,11 @@
|
|||
diff -r 97ac365bfcd6 lesstif-0.93.94/lib/Xm-2.1/Xpm.c
|
||||
--- lesstif-0.93.94/lib/Xm-2.1/Xpm.c Mon Oct 06 15:52:50 2008 +0200
|
||||
+++ lesstif-0.93.94/lib/Xm-2.1/Xpm.c Mon Oct 06 15:53:16 2008 +0200
|
||||
@@ -54,6 +54,7 @@
|
||||
#include <io.h>
|
||||
#endif
|
||||
|
||||
+#include <stdint.h>
|
||||
#include <X11/Intrinsic.h> /* Avoid re-definition of Pixel-type */
|
||||
|
||||
#include <Xm/XpmP.h>
|
|
@ -3008,6 +3008,11 @@ let
|
|||
inherit (xlibs) libXp libXau;
|
||||
};
|
||||
|
||||
lesstif93 = import ../development/libraries/lesstif-0.93 {
|
||||
inherit fetchurl stdenv x11;
|
||||
inherit (xlibs) libXp libXau;
|
||||
};
|
||||
|
||||
lib3ds = import ../development/libraries/lib3ds {
|
||||
inherit fetchurl stdenv unzip;
|
||||
};
|
||||
|
@ -7346,10 +7351,10 @@ let
|
|||
### SCIENCE/BIOLOGY
|
||||
|
||||
arb = import ../applications/science/biology/arb {
|
||||
inherit fetchurl stdenv readline libpng zlib x11 lesstif freeglut perl;
|
||||
inherit fetchurl stdenv readline libpng zlib x11 lesstif93 freeglut perl;
|
||||
inherit (xlibs) libXpm libXaw libX11 libXext libXt;
|
||||
# motif = lesstif;
|
||||
inherit mesa glew libtiff lynx rxp sablotron jdk xfig transfig gv gnuplot;
|
||||
lesstif = lesstif93;
|
||||
};
|
||||
|
||||
biolib = import ../development/libraries/science/biology/biolib {
|
||||
|
|
Loading…
Reference in a new issue