rpms/lesstif/FC-6 lesstif-0.95-resource-fix.patch, NONE, 1.1 lesstif-0.95-text.patch, NONE, 1.1 lesstif-0.95.0-accelkeys.patch, NONE, 1.1 lesstif-0.95.0-cutpaste64.patch, NONE, 1.1 lesstif-64.patch, NONE, 1.1 .cvsignore, 1.3, 1.4 lesstif.spec, 1.8, 1.9 sources, 1.3, 1.4

Hans de Goede (jwrdegoede) fedora-extras-commits at redhat.com
Thu Aug 30 23:00:42 UTC 2007


Author: jwrdegoede

Update of /cvs/extras/rpms/lesstif/FC-6
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv28420

Modified Files:
	.cvsignore lesstif.spec sources 
Added Files:
	lesstif-0.95-resource-fix.patch lesstif-0.95-text.patch 
	lesstif-0.95.0-accelkeys.patch lesstif-0.95.0-cutpaste64.patch 
	lesstif-64.patch 
Log Message:
* Thu Aug 30 2007 Hans de Goede <j.w.r.degoede at hhs.nl> 0.95.0-18
- Fix cut and paste from / to lesstif apps on 64 bits machines (bz 243508)
- Fix accelkeys which use more then one modifier (bz 214018)


lesstif-0.95-resource-fix.patch:

--- NEW FILE lesstif-0.95-resource-fix.patch ---
--- lesstif-0.95/lib/Xm-2.1/DialogS.c	2004/09/29 17:48:41	1.2
+++ lesstif-0.95/lib/Xm-2.1/DialogS.c	2007/02/04 13:26:15	1.3
@@ -1,6 +1,6 @@
 /**
  *
- * $Header: /cvsroot/lesstif/lesstif/lib/Xm-2.1/DialogS.c,v 1.2 2004/09/29 17:48:41 dannybackx Exp $
+ * $Header: /cvsroot/lesstif/lesstif/lib/Xm-2.1/DialogS.c,v 1.3 2007/02/04 13:26:15 dannybackx Exp $
  *
  * derived from Xt Vendor class.c 
  *
@@ -26,7 +26,7 @@
  *
  **/
 
-static const char rcsid[] = "$Header: /cvsroot/lesstif/lesstif/lib/Xm-2.1/DialogS.c,v 1.2 2004/09/29 17:48:41 dannybackx Exp $";
+static const char rcsid[] = "$Header: /cvsroot/lesstif/lesstif/lib/Xm-2.1/DialogS.c,v 1.3 2007/02/04 13:26:15 dannybackx Exp $";
 
 /*
  * This controls questionable behavior.  It will go away
@@ -276,7 +276,7 @@
 	    }
 	}
 
-	if (j != nshells)
+	if (j == nshells)
 	{
 	    combined[nshells + addon] = ext_resources[i];
 	    addon++;

lesstif-0.95-text.patch:

--- NEW FILE lesstif-0.95-text.patch ---
--- lesstif-0.95/lib/Xm-2.1/TextF.c	2006/04/19 18:42:22	1.9
+++ lesstif-0.95/lib/Xm-2.1/TextF.c	2007/02/06 19:05:57	1.10
@@ -1,6 +1,6 @@
 /**
  *
- * $Header: /cvsroot/lesstif/lesstif/lib/Xm-2.1/TextF.c,v 1.9 2006/04/19 18:42:22 dannybackx Exp $
+ * $Header: /cvsroot/lesstif/lesstif/lib/Xm-2.1/TextF.c,v 1.10 2007/02/06 19:05:57 dannybackx Exp $
  *
  * Copyright (C) 1995 Free Software Foundation, Inc.
  * Copyright © 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2004, 2005 LessTif Development Team
@@ -23,7 +23,7 @@
  *
  **/
 
-static const char rcsid[] = "$Header: /cvsroot/lesstif/lesstif/lib/Xm-2.1/TextF.c,v 1.9 2006/04/19 18:42:22 dannybackx Exp $";
+static const char rcsid[] = "$Header: /cvsroot/lesstif/lesstif/lib/Xm-2.1/TextF.c,v 1.10 2007/02/06 19:05:57 dannybackx Exp $";
 
 #include <LTconfig.h>
 
@@ -2312,8 +2312,11 @@
 				ww = wid;
 
 			/* Protect against overwriting the left/right borders. */
-			if (x < bw)
+			if (x < bw) {
 				xx = bw;
+				ww -= bw - x;
+			}
+
 			if (XtWidth(w) < xx + ww + bw)
 				ww = XtWidth(w) - 2 * bw - xx;
 
@@ -2323,11 +2326,13 @@
 				xx, bh,
 				ww,
 				XtHeight(w) - 2 * bh));
-			XClearArea(XtDisplay((Widget)w), XtWindow(w),
-				xx, bh,
-				ww /* XtWidth(w) - 2 * bw */,
-				XtHeight(w) - 2 * bh,
-				False);
+
+			if (ww > 0)
+				XClearArea(XtDisplay((Widget)w), XtWindow(w),
+					xx, bh,
+					ww /* XtWidth(w) - 2 * bw */,
+					XtHeight(w) - 2 * bh,
+					False);
 
 			XSetForeground(XtDisplay(w), TextF_DrawGC(w), Prim_Foreground(w));
 			XSetBackground(XtDisplay(w), TextF_DrawGC(w), XtBackground(w));

lesstif-0.95.0-accelkeys.patch:

--- NEW FILE lesstif-0.95.0-accelkeys.patch ---
diff -up lesstif-0.95.0/lib/Xm-2.1/Manager.c.accelkeys lesstif-0.95.0/lib/Xm-2.1/Manager.c
--- lesstif-0.95.0/lib/Xm-2.1/Manager.c.accelkeys	2005-04-02 16:58:11.000000000 +0200
+++ lesstif-0.95.0/lib/Xm-2.1/Manager.c	2007-08-31 00:19:19.000000000 +0200
@@ -1764,7 +1764,8 @@ _XmAcceleratorHandler(Widget w, XtPointe
 	 modifiers" or "these modifiers plus any others" */
 	if (/*MGR_KeyboardList(w)[i].eventType == event->type && */
 	    MGR_KeyboardList(w)[i].key == event->xkey.keycode &&
-	    (MGR_KeyboardList(w)[i].modifiers & event->xkey.state) == MGR_KeyboardList(w)[i].modifiers &&
+	    MGR_KeyboardList(w)[i].modifiers ==
+	        (event->xkey.state & ~(Mod2Mask | LockMask)) &&
 	    MGR_KeyboardList(w)[i].component == comp &&
 	    XtIsManaged(comp))
 	{

lesstif-0.95.0-cutpaste64.patch:

--- NEW FILE lesstif-0.95.0-cutpaste64.patch ---
diff -up lesstif-0.95.0/lib/Xm-2.1/CutPaste.c.cutpaste64 lesstif-0.95.0/lib/Xm-2.1/CutPaste.c
--- lesstif-0.95.0/lib/Xm-2.1/CutPaste.c.cutpaste64	2004-08-28 21:22:43.000000000 +0200
+++ lesstif-0.95.0/lib/Xm-2.1/CutPaste.c	2007-08-31 00:19:09.000000000 +0200
@@ -606,7 +606,16 @@ _XmClipboardGetWindowProperty(Display *d
 
 	ret_buf = (unsigned *)XtRealloc((char *)ret_buf,
 					alloc_size + alloc_incr + 1);
-	memcpy(&ret_buf[offset], prop, alloc_incr);
+        if (actual_format == 32 && sizeof(long) != 4)
+        {
+            int i;
+            unsigned long *in = (unsigned long *)prop;
+            
+            for (i = 0; i < nitems; i++)
+                ret_buf[offset + i] = in[i];
+        }
+        else
+	    memcpy(&ret_buf[offset], prop, alloc_incr);
 	alloc_size += alloc_incr;
 
 	switch (actual_format)
@@ -1001,8 +1012,9 @@ _XmClipboardReplaceItem(Display *display
 {
     Window root;
     Atom item;
-    int nunits, tstart, tlen;
+    int i, nunits, tstart, tlen;
     long transferlen;
+    long *convert_buf = NULL;
 
     root = DefaultRootWindow(display);
     item = _XmClipboardGetAtomFromId(display, id);
@@ -1014,6 +1026,12 @@ _XmClipboardReplaceItem(Display *display
     case 32:
 	len >>= 2;
 	nunits = transferlen;
+	/* XChangeProperty expects a buffer of longs when receiving 32 bits
+	   data, MEUHH */
+	if (sizeof(long) != 4)
+	    convert_buf = XtMalloc(len * sizeof(long));
+        for (i = 0; i < len; i++)
+            convert_buf[i] = data[i];
 	break;
 
     case 16:
@@ -1040,7 +1058,9 @@ _XmClipboardReplaceItem(Display *display
 	}
 
 	XChangeProperty(display, root, item, item, format, mode,
-			(unsigned char *)&data[tstart], tlen);
+			convert_buf? (unsigned char *)&convert_buf[tstart] :
+                                     (unsigned char *)&data[tstart],
+                        tlen);
 
 	len -= tlen;
 	mode = PropModeAppend;

lesstif-64.patch:

--- NEW FILE lesstif-64.patch ---
--- lesstif-0.95.0/include/Motif-2.1/Xm/MwmUtil.h	2007-01-05 06:19:42.000000000 -0500
+++ lesstif-0.95.0/include/Motif-2.1/Xm/MwmUtil.h	2007-08-02 15:44:09.000000000 -0400
@@ -33,11 +33,11 @@
 #endif
 
 typedef struct {
-    CARD32 flags;
-    CARD32 functions;
-    CARD32 decorations;
-    INT32 input_mode;
-    CARD32 status;
+    unsigned long flags;
+    unsigned long functions;
+    unsigned long decorations;
+    long input_mode;
+    unsigned long status;
 } MotifWmHints, MwmHints;
 
 #define MWM_HINTS_FUNCTIONS     (1L << 0)
@@ -100,11 +100,11 @@
  * _MWM_HINTS property
  */
 typedef struct {
-    CARD32 flags;
-    CARD32 functions;
-    CARD32 decorations;
-    INT32 inputMode;
-    CARD32 status;
+    unsigned long flags;
+    unsigned long functions;
+    unsigned long decorations;
+    long inputMode;
+    unsigned long status;
 } PropMotifWmHints;
 
 typedef PropMotifWmHints PropMwmHints;


Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/lesstif/FC-6/.cvsignore,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- .cvsignore	1 Jan 2007 17:30:56 -0000	1.3
+++ .cvsignore	30 Aug 2007 23:00:09 -0000	1.4
@@ -1,2 +1,2 @@
+lesstif2_0.95.0-2.diff.gz
 lesstif-0.95.0.tar.bz2
-lesstif2_0.94.4-2.diff.gz


Index: lesstif.spec
===================================================================
RCS file: /cvs/extras/rpms/lesstif/FC-6/lesstif.spec,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- lesstif.spec	5 Jan 2007 10:42:56 -0000	1.8
+++ lesstif.spec	30 Aug 2007 23:00:09 -0000	1.9
@@ -1,13 +1,42 @@
 Summary: OSF/Motif(R) library clone
 Name: lesstif
 Version: 0.95.0
-Release: 15%{?dist}
-License: LGPL
+Release: 18%{?dist}
+License: LGPLv2+
+# in Xm-2.1/
+# some files are MIT
+# LTV6Editres.c XpmAttrib.c XpmCrBufFrI.c XpmCrBufFrP.c XpmCrDatFrI.c 
+# XpmCrDatFrP.c Xpmcreate.c XpmCrIFrBuf.c XpmCrIFrDat.c XpmCrIFrP.c 
+# XpmCrPFrBuf.c XpmCrPFrDat.c XpmCrPFrI.c Xpmdata.c Xpmhashtab.c XpmImage.c 
+# XpmInfo.c Xpmmisc.c Xpmparse.c XpmRdFToBuf.c XpmRdFToDat.c XpmRdFToI.c 
+# XpmRdFToP.c Xpmrgb.c Xpmscan.c Xpms_popen.c XpmWrFFrBuf.c XpmWrFFrDat.c 
+# XpmWrFFrI.c XpmWrFFrP.c
+# Transltns.c is machine generated (no license, assuming public domain)
+
+# MIT, short version: lib/config/mxmkmf.in
+
+# in includes
+# MIT:
+# XmI/LTV5EditresP.h XmI/LTV6EditresP.h XmI/XpmI.h Xm/XpmP.h
+
+# clients/Motif-2.1/mwm/
+# MIT:
+# mwm.h cursors.c decorate.c desktop.c events.c functions.c menus.c misc.c
+# mwm.c pan.c props.c resize.c screens.c windows.c
+# no restriction
+# colormaps.c icons.c move.c pager.c
+# GPLV2+
+# gethostname.c mwmparse.h
+
+# clients/Motif-2.1/uil/
+# no license (LGPLv2+?)
+# Expression.c
+
 Group: System Environment/Libraries
-#Source: ftp://ftp.hungry.com/pub/hungry/lesstif/srcdist/lesstif-%{version}.tar.bz2
-#Source: http://dl.sf.net/lesstif/lesstif-%{version}.tar.bz2 
-Source: http://belnet.dl.sourceforge.net/sourceforge/lesstif/lesstif-%{version}.tar.bz2
+Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.bz2
 Source1: lesstif-xmbind
+# mwm session file
+Source2: mwm.desktop
 # put mwm conf file in %{_sysconfdir}, and install Dt in %_libdir
 Patch0: lesstif-Makefile.in.diff
 # have motif-config honor libdir
@@ -15,8 +44,15 @@
 Patch2: lesstif-0.95.0-CAN-2005-0605.patch
 Patch3: lesstif-0.95.0-64bitcleanups.patch
 Patch4: lesstif-0.95.0-c++fix.patch
-Patch5: http://ftp.debian.org/debian/pool/main/l/lesstif2/lesstif2_0.94.4-2.diff.gz
+Patch5: http://ftp.debian.org/debian/pool/main/l/lesstif2/lesstif2_0.95.0-2.diff.gz
 Patch6: lesstif-0.95.0-scroll.patch
+# patch from kgallowa at redhat.com, to achieve API conformance with 
+# openmotif on 64 bit.
+Patch7: lesstif-64.patch
+Patch8: lesstif-0.95-resource-fix.patch
+Patch9: lesstif-0.95-text.patch
+Patch10: lesstif-0.95.0-cutpaste64.patch
+Patch11: lesstif-0.95.0-accelkeys.patch
 
 Url: http://www.lesstif.org/
 
@@ -40,7 +76,7 @@
 #Obsoletes: openmotif <=  2.3.0-0.2.1
 # openmotif21 provides the same soname than lesstif. Both seem to work 
 # fine with some apps (ddd, xpdf) but show binary incompatibility with
-# nedit and runtime incompatible with grace. Moreover openmotif21
+# nedit and runtime incompatible with grace. Moreover openmotif21 libs
 # are in /usr/X11R6/lib, and therefore may not be found by the linker.
 # A conflict would break upgrade paths.
 Obsoletes: openmotif21 <= 2.1.30-17.1.1
@@ -59,6 +95,7 @@
 
 %package clients
 Summary: Command line utilities for LessTif
+License: LGPLv2+
 Group: Applications/System
 Requires: %{name} = %{version}-%{release}
 
@@ -70,6 +107,7 @@
 
 %package mwm
 Summary: Lesstif Motif window manager clone based on fvwm
+License: GPLv2+
 Group: User Interface/Desktops
 Requires: %{name} = %{version}-%{release}
 
@@ -92,10 +130,11 @@
 
 
 %description devel
-Lesstif-devel contains the lesstif static library and header files
-required to develop Motif based applications using LessTif. If you
-want to develop LessTif applications, you'll need to install
-lesstif-devel along with lesstif.
+Lesstif-devel contains the header files required to develop 
+Motif based applications using LessTif. If you want to develop 
+LessTif applications, you'll need to install lesstif-devel 
+along with lesstif.
+
 
 %prep
 %setup -q
@@ -104,14 +143,30 @@
 %patch1 -p1 -b .multilib
 %patch2 -p1
 %patch3 -p1
-%patch4 -p1
+%patch4 -p1 -b .VendorSP
 %patch5 -p1
 %patch6 -p1
+#%patch7 -p1
+%patch8 -p1
+%patch9 -p1
+%patch10 -p1
+%patch11 -p1
+
+# and pick up some fixes from Debian
+patch -p1 < debian/patches/020_xpmpipethrough.diff
+patch -p1 < debian/patches/021_xim_chained_list_crash.diff
+patch -p1 < debian/patches/030_manpage.diff
+
+# correct patched header file timestamp
+touch -r include/Motif-2.1/Xm/VendorSP.h.VendorSP include/Motif-2.1/Xm/VendorSP.h
 
-# those substitutions are not usefull, since the symbols are defined
+# those substitutions are not really usefull, since the symbols are redefined
 # in the Makefile, but it is clearer like that
+touch -r clients/Motif-2.1/mwm/mwm.h __mwm_stamp
 sed -i -e 's:"/usr/X11/include":"%{_includedir}":' \
   -e 's:"/usr/lib/X11/mwm":"%{_sysconfdir}/mwm":' clients/Motif-2.1/mwm/mwm.h
+touch -r __mwm_stamp clients/Motif-2.1/mwm/mwm.h
+rm __mwm_stamp
 
 %build
 # --enable-shared --disable-static is the default
@@ -135,7 +190,8 @@
 rm -rf $RPM_BUILD_ROOT
 
 make install DESTDIR=$RPM_BUILD_ROOT \
- appdir='%{_datadir}/X11/app-defaults' configdir='%{_datadir}/X11/config'
+ appdir='%{_datadir}/X11/app-defaults' configdir='%{_datadir}/X11/config' \
+ INSTALL="install -p"
 
 # Handle debuginfo dangling-relative-symlink
 # rpm doesn't handle symlinks properly when generating debuginfo
@@ -143,17 +199,23 @@
 cp -a clients/Motif-1.2/xmbind/xmbind.c \
       clients/Motif-2.1/xmbind/xmbind.c
 
-rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
+rm $RPM_BUILD_ROOT%{_libdir}/*.la
 rm -rf $RPM_BUILD_ROOT%{_prefix}/LessTif
 
 # install a script that launches xmbind in xinit
 mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/X11/xinit/xinitrc.d
-install -m 755 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/X11/xinit/xinitrc.d/xmbind.sh
+install -p -m 755 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/X11/xinit/xinitrc.d/xmbind.sh
+
+# install mwm xsession file
+mkdir -p $RPM_BUILD_ROOT%{_datadir}/xsessions/
+install -p -m644 %{SOURCE2} $RPM_BUILD_ROOT%{_datadir}/xsessions/
 
 # correct the paths in mxmkmf
-sed -i -e 's:"\${xprefix}/lib/X11/config":%{_datadir}/X11/config":' \
- -e 's:"\${lprefix}/lib/LessTif/config":%{_datadir}/X11/config":' \
+sed -i -e 's:"\${xprefix}/lib/X11/config":"%{_datadir}/X11/config":' \
+ -e 's:"\${lprefix}/lib/LessTif/config":"%{_datadir}/X11/config":' \
  $RPM_BUILD_ROOT%{_bindir}/mxmkmf
+# use .in timestamp, since the .in and resulting files are the same
+touch -r lib/config/mxmkmf.in $RPM_BUILD_ROOT%{_bindir}/mxmkmf
 
 # this is referenced into mwm
 mkdir -p $RPM_BUILD_ROOT%{_includedir}/X11/bitmaps/
@@ -165,22 +227,39 @@
 rm $RPM_BUILD_ROOT%{_mandir}/man*/ltversion*
 
 # prepare docs
-cp -a doc clean_docs
-find clean_docs -name 'Makefile*' -exec rm {} \;
-rm clean_docs/lessdox/clients/*.1 clean_docs/lessdox/clients/*.5
-rm clean_docs/lessdox/widgets/*.3
+rm -rf __fedora_clean_docs
+cp -a doc __fedora_clean_docs
+find __fedora_clean_docs -name 'Makefile*' -exec rm {} \;
+# correct timestamps of html files generated from man pages
+# and remove man pages
+for suffix in 1 5 3; do
+   for file in __fedora_clean_docs/lessdox/*/*.$suffix; do
+      basefile=`basename $file .$suffix`
+      dir=`dirname $file`
+      touch -r $file $dir/$basefile.html
+      rm $file
+   done
+done
 # remove the empty directory
-rmdir clean_docs/lessdox/functions
+rmdir __fedora_clean_docs/lessdox/functions
 
 # remove host.def, it lives in the imake package
 rm $RPM_BUILD_ROOT%{_datadir}/X11/config/host.def
 
+# use ChangeLog file timestamp to have the same timestamp on all arches
+# for noarch files
+touch -r ChangeLog $RPM_BUILD_ROOT%{_datadir}/X11/config/LessTif.tmpl \
+ $RPM_BUILD_ROOT%{_includedir}/Xm/Xm.h
+
+
 %post -p /sbin/ldconfig
 %postun -p /sbin/ldconfig
 
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+
 %files
 %defattr(-,root,root,-)
 %doc COPYING COPYING.LIB CREDITS AUTHORS BUG-REPORTING FAQ README
@@ -197,6 +276,7 @@
 %{_includedir}/X11/bitmaps/
 %{_bindir}/mwm
 %{_mandir}/man*/mwm*
+%{_datadir}/xsessions/mwm.desktop
 %{_datadir}/X11/app-defaults/Mwm
 
 %files clients
@@ -209,7 +289,7 @@
 
 %files devel
 %defattr(-,root,root,-)
-%doc clean_docs/*
+%doc  __fedora_clean_docs/*
 %{_bindir}/motif-config
 %{_bindir}/mxmkmf
 %{_includedir}/Dt/
@@ -223,7 +303,25 @@
 %{_datadir}/aclocal/ac_find_motif.m4
 %{_datadir}/X11/config/*
 
+
 %changelog
+* Thu Aug 30 2007 Hans de Goede <j.w.r.degoede at hhs.nl> 0.95.0-18
+- Fix cut and paste from / to lesstif apps on 64 bits machines (bz 243508)
+- Fix accelkeys which use more then one modifier (bz 214018)
+
+* Thu Aug 30 2007 Hans de Goede <j.w.r.degoede at hhs.nl> 0.95.0-17
+- Update included Debian 0.94.4-2 patch to the Debian 0.95.0-2 patch
+- Not only include but also actually apply Debian's patches (bz 261821)
+- Add 2 patches with small fixes from lesstif CVS (bz 261821)
+- Do not apply lesstif-64.patch it causes more issues then it fixes (bz 253456)
+
+* Wed Aug 15 2007 Patrice Dumas <pertusus at free.fr> 0.95.0-16
+- conform better to openmotif API, lesstif-64.patch, by 
+  kgallowa at redhat.com
+- fix licenses
+- keep timestamps
+- add mwm xsession file
+
 * Fri Jan  5 2007 Patrice Dumas <pertusus at free.fr> 0.95.0-15
 - Obsolete openmotif21 versions provided in older fedora core releases.
   openmotif21 provides the same soname than lesstif, with some 


Index: sources
===================================================================
RCS file: /cvs/extras/rpms/lesstif/FC-6/sources,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- sources	1 Jan 2007 17:30:56 -0000	1.3
+++ sources	30 Aug 2007 23:00:09 -0000	1.4
@@ -1,2 +1,2 @@
+6406d0fa85ee2467d155255e172d8529  lesstif2_0.95.0-2.diff.gz
 ab895165c149d7f95843c7584b1c7ad4  lesstif-0.95.0.tar.bz2
-1e805541d027f2ac0c3b1c590565c66a  lesstif2_0.94.4-2.diff.gz




More information about the fedora-extras-commits mailing list