Updating lesstif to 0.95.2 (2009).

Some patches can be removed.
I updated it because the scroll wheel was going the oposite direction in ddd.
https://bugs.launchpad.net/ubuntu/+source/ddd/+bug/37664

(cherry picked from commit 0115853aa9)
This commit is contained in:
Lluís Batlle i Rossell 2014-09-29 10:23:17 +02:00
parent c1e962f1e2
commit b36095578c
5 changed files with 2 additions and 104 deletions

View File

@ -1,13 +0,0 @@
--- 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 */

View File

@ -1,23 +0,0 @@
--- a/include/Motif-2.1/Xm/VendorSP.h 2006-07-07 15:58:04.000000000 +0200
+++ b/include/Motif-2.1/Xm/VendorSP.h 2006-07-07 15:58:19.000000000 +0200
@@ -30,10 +30,6 @@
#include <Xm/VendorS.h>
#include <X11/ShellP.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-
XMLIBEXPORT extern Cardinal _XmFilterResources(XtResource *resources,
Cardinal numResources,
WidgetClass filterClass,
@@ -57,9 +53,4 @@
XMLIBEXPORT extern VendorShellClassRec vendorShellClassRec;
-
-#ifdef __cplusplus
-}
-#endif
-
#endif /* _XM_VENDORSP_H */

View File

@ -1,38 +0,0 @@
--- lesstif2-0.94.4.orig/lib/Xm-2.1/Xpmcreate.c
+++ lesstif2-0.94.4/lib/Xm-2.1/Xpmcreate.c
@@ -1265,10 +1265,10 @@
register char *src;
register char *dst;
register unsigned int *iptr;
- register unsigned int x, y, i;
+ register unsigned int x, y;
register char *data;
Pixel pixel, px;
- int nbytes, depth, ibu, ibpp;
+ int nbytes, depth, ibu, ibpp, i;
data = image->data;
iptr = pixelindex;
--- lesstif2-0.94.4.orig/lib/Xm-2.1/Xpmscan.c
+++ lesstif2-0.94.4/lib/Xm-2.1/Xpmscan.c
@@ -672,8 +672,8 @@
char *dst;
unsigned int *iptr;
char *data;
- unsigned int x, y, i;
- int bits, depth, ibu, ibpp, offset;
+ unsigned int x, y;
+ int bits, depth, ibu, ibpp, offset, i;
unsigned long lbt;
Pixel pixel, px;
@@ -684,6 +684,9 @@
ibpp = image->bits_per_pixel;
offset = image->xoffset;
+ if (image->bitmap_unit < 0)
+ return (XpmNoMemory);
+
if ((image->bits_per_pixel | image->depth) == 1) {
ibu = image->bitmap_unit;
for (y = 0; y < height; y++)

View File

@ -1,24 +0,0 @@
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));

View File

@ -3,8 +3,8 @@
stdenv.mkDerivation {
name = "lesstif-0.95.0-p2";
src = fetchurl {
url = mirror://sourceforge/lesstif/lesstif-0.95.0.tar.bz2;
md5 = "ab895165c149d7f95843c7584b1c7ad4";
url = mirror://sourceforge/lesstif/lesstif-0.95.2.tar.bz2;
sha256 = "1qzpxjjf7ri1jzv71mvq5m9g8hfaj5yzwp30rwxlm6n2b24a6jpb";
};
buildInputs = [xlibsWrapper];
propagatedBuildInputs = [libXp libXau];
@ -15,11 +15,7 @@ stdenv.mkDerivation {
# in Debian, so we assume they have been sent upstream.
#
patches = [
./c-bad_integer_cast.patch
./c-linkage.patch
./c-unsigned_int.patch
./c-missing_xm_h.patch
./c-xim_chained_list_crash.patch
./c-render_table_crash.patch
./c-xpmpipethrough.patch
];