rpms/xfig/F-10 xfig-3.2.5-rh490257.patch, NONE, 1.1 xfig-3.2.5-rh490259.patch, NONE, 1.1 xfig.spec, 1.52, 1.53

Hans de Goede jwrdegoede at fedoraproject.org
Sun Mar 15 15:46:23 UTC 2009


Author: jwrdegoede

Update of /cvs/extras/rpms/xfig/F-10
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv23854

Modified Files:
	xfig.spec 
Added Files:
	xfig-3.2.5-rh490257.patch xfig-3.2.5-rh490259.patch 
Log Message:
* Sun Mar 15 2009 Hans de Goede <hdegoede at redhat.com> 3.2.5-16
- Fix Text size field inserts characters on left instead of right (#490257)
- Fix xfig-Xaw3d does not display messages in message panel (#490259)


xfig-3.2.5-rh490257.patch:

--- NEW FILE xfig-3.2.5-rh490257.patch ---
--- xfig.3.2.5/w_util.c	2007-01-16 18:58:18.000000000 +0100
+++ xfig.3.2.5.wip/w_util.c	2009-03-15 13:31:47.000000000 +0100
@@ -932,21 +932,23 @@
     DeclareArgs(4);
     spin_struct *spins = (spin_struct*) info;
     char	buf[200];
-    int		val, i, pos;
+    int		val, i, modified = 0;
+    XawTextPosition pos;
 
     /* save cursor position */
     FirstArg(XtNinsertPosition, &pos);
     GetValues(spins->widget);
 
-    buf[sizeof(buf)-1]='\0';
-    strncpy(buf,panel_get_value(spins->widget),sizeof(buf));
+    snprintf(buf, sizeof(buf), "%s", panel_get_value(spins->widget));
+
     for (i=0; i<strlen(buf); )
 	/* delete any non-digits (including leading "-" when min >= 0 */
 	if ((spins->min >= 0.0 && buf[i] == '-') || ((buf[i] < '0' || buf[i] > '9') && buf[i] != '-') || 
 			(i != 0 && buf[i] == '-')) {
-	    strcpy(&buf[i],&buf[i+1]);
+	    memmove(&buf[i], &buf[i+1], strlen(&buf[i]));
 	    /* adjust cursor for char we just removed */
 	    pos--;
+	    modified = 1;
 	} else {
 	    i++;
 	}
@@ -954,15 +956,21 @@
     if (strlen(buf) > 0 && !(strlen(buf)==1 && buf[0] == '-')) {
 	val = atoi(buf);
 	/* only check max.  If min is, say 3 and user wants to type 10, the 1 is too small */
-	if (val > (int) spins->max)
+	if (val > (int) spins->max) {
 	    val = (int) spins->max;
-	sprintf(buf,"%d", val);
+	    sprintf(buf,"%d", val);
+	    modified = 1;
+        }
     }
-    panel_set_value(spins->widget, buf);
-    /* put cursor back */
-    if (pos < strlen(buf)) {
-	FirstArg(XtNinsertPosition, pos+1);
-	SetValues(spins->widget);
+
+    if (modified) {
+        panel_set_value(spins->widget, buf);
+
+	/* put cursor back */
+	if (pos < strlen(buf)) {
+	    FirstArg(XtNinsertPosition, (pos+1));
+	    SetValues(spins->widget);
+	}
     }
 }
 

xfig-3.2.5-rh490259.patch:

--- NEW FILE xfig-3.2.5-rh490259.patch ---
--- xfig.3.2.5/w_msgpanel.c	2005-07-26 18:40:01.000000000 +0200
+++ xfig.3.2.5.xaw3d/w_msgpanel.c	2009-03-15 16:13:31.000000000 +0100
@@ -85,13 +85,15 @@
 init_msg(Widget tool)
 {
     /* now the message panel */
-    FirstArg(XtNfont, roman_font);
-    FirstArg(XtNwidth, MSGPANEL_WD);
+    FirstArg(XtNfont, roman_font);
+    NextArg(XtNwidth, MSGPANEL_WD);
     NextArg(XtNheight, MSGPANEL_HT);
     NextArg(XtNstring, "\0");
     NextArg(XtNfromVert, cmd_form);
     NextArg(XtNvertDistance, -INTERNAL_BW);
     NextArg(XtNborderWidth, INTERNAL_BW);
+    NextArg(XtNtopMargin, 1);
+    NextArg(XtNbottomMargin, 1);
     NextArg(XtNdisplayCaret, False);
     NextArg(XtNtop, XtChainTop);
     NextArg(XtNbottom, XtChainTop);


Index: xfig.spec
===================================================================
RCS file: /cvs/extras/rpms/xfig/F-10/xfig.spec,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -r1.52 -r1.53
--- xfig.spec	14 Jul 2008 08:39:05 -0000	1.52
+++ xfig.spec	15 Mar 2009 15:46:23 -0000	1.53
@@ -3,7 +3,7 @@
 Summary: An X Window System tool for drawing basic vector graphics
 Name: xfig
 Version: 3.2.5
-Release: 11%{?dist}
+Release: 16%{?dist}
 License: MIT
 Group: Applications/Multimedia
 URL: http://www.xfig.org/
@@ -24,6 +24,8 @@
 Patch14: xfig-3.2.5-zoom-crash.patch
 Patch15: xfig-3.2.5-missing-protos.patch
 Patch16: xfig-3.2.5-modepanel.patch
+Patch17: xfig-3.2.5-rh490257.patch
+Patch18: xfig-3.2.5-rh490259.patch
 
 BuildRequires: libjpeg-devel
 BuildRequires: libpng-devel
@@ -47,7 +49,8 @@
 Requires: %{name}-common = %{version}-%{release}
 Provides: %{name}-executable = %{version}-%{release}
 # Xaw3d used to be the one in a subpackage, now the plain Xaw version is
-Obsoletes: %{name}-Xaw3d < %{version}-%{release}
+Obsoletes: %{name}-Xaw3d <= 3.2.5-7.fc8
+Provides: %{name}-Xaw3d = %{version}-%{release}
 
 %description
 Xfig is an X Window System tool for creating basic vector graphics,
@@ -78,6 +81,7 @@
 Summary:        Common xfig files
 Group:          Applications/Multimedia
 Requires:       transfig >= 1:3.2.5, xdg-utils, aspell, urw-fonts
+Requires:       xorg-x11-fonts-base
 # So that this will get uninstalled together with xfig / xfig-Xaw3d
 Requires:       %{name}-executable = %{version}-%{release}
 
@@ -99,12 +103,16 @@
 %patch14 -p1 -b .zoom-crash
 %patch15 -p1
 %patch16 -p1
+%patch17 -p1
+%patch18 -p1
 ln -nfs Doc/xfig.man xfig.man
 find -type f -print0 | xargs -0 chmod -x
+sed -i.save 's/\r//g' Doc/html/index.html
+touch -r Doc/html/index.html.save Doc/html/index.html
 rm `find Doc -name '*.orig'` Doc/html/*.save Doc/html/images/sav1a0.tmp
-sed -i 's/\r//g' Doc/html/index.html
 for i in Doc/html/{new_features,new_features.3.2.4,bugs_fixed.3.2.4}.html; do
   iconv -f ISO-8859-1 -t UTF8 $i > $i.UTF-8
+  touch -r $i $i.UTF-8
   mv $i.UTF-8 $i
 done
 
@@ -131,13 +139,17 @@
 %install
 rm -rf %{buildroot}
 
-make DESTDIR=%{buildroot} XFIGDOCDIR=%{_docdir}/%{name}-%{version} install.all
+make DESTDIR=%{buildroot} XFIGDOCDIR=%{_docdir}/%{name}-%{version} \
+     INSTALL="install -p" install.all
 
 # install the Xaw3d version and the wrapper for the .desktop file
 mv %{buildroot}%{_bindir}/%{name} %{buildroot}%{_bindir}/%{name}-plain
 install -p -m 755 %{SOURCE3} %{buildroot}%{_bindir}/%{name}
 install -m 755 %{name}-Xaw3d %{buildroot}%{_bindir}
 
+# remove the map generation scripts, these are for xfig developers only
+rm %{buildroot}%{_datadir}/%{name}/Libraries/Maps/{USA,Canada}/assemble
+
 mkdir -p %{buildroot}%{_datadir}/icons/hicolor/32x32/apps \
          %{buildroot}%{_datadir}/applications
 
@@ -190,6 +202,22 @@
 
 
 %changelog
+* Sun Mar 15 2009 Hans de Goede <hdegoede at redhat.com> 3.2.5-16
+- Fix Text size field inserts characters on left instead of right (#490257)
+- Fix xfig-Xaw3d does not display messages in message panel (#490259)
+
+* Thu Feb 26 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 3.2.5-15
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
+
+* Sun Feb 22 2009 Hans de Goede <hdegoede at redhat.com> 3.2.5-14
+- Add missing Requires: xorg-x11-fonts-base (#486701)
+
+* Mon Nov 10 2008 Stepan Kasal <skasal at redhat.com> - 3.2.5-13
+- fix the Obsoletes tag to <= 3.2.5-7.fc8, which is the last
+  release with Xaw3d subpackage
+
+* Tue Nov  4 2008 Hans de Goede <hdegoede at redhat.com> 3.2.5-12
+- Various small specfile cleanups from merge review
 
 * Mon Jul 14 2008 Ian Hutchinson <ihutch at mit.edu> 3.2.5-11
 - Fix incorrect height of modepanel.




More information about the fedora-extras-commits mailing list