Compare commits

...
Sign in to create a new pull request.

3 commits

Author SHA1 Message Date
Fedora Release Engineering
7f5d632359 dist-git conversion 2010-07-29 15:50:10 +00:00
ee0ced9b71 - Also compile a version against Xaw3d instead of plain Xaw, available in
the new xfig-Xaw3d package
- Various specfile cleanups for packaging guidelines compliance
- Remove spurious executable permissions on various files (bz 247424)
- Apply patch fixing problems with xfig not finding fonts (bz 210278)
2007-11-16 21:22:17 +00:00
Bill Nottingham
2b2000b340 Initialize branch F-7 for xfig 2007-05-18 11:25:19 +00:00
9 changed files with 303 additions and 35 deletions

View file

View file

@ -1,6 +0,0 @@
# Makefile for source rpm: xfig
# $Id$
NAME := xfig
SPECFILE = $(firstword $(wildcard *.spec))
include ../common/Makefile.common

View file

@ -0,0 +1,39 @@
diff -up xfig.3.2.5/Fig-color.ad~ xfig.3.2.5/Fig-color.ad
--- xfig.3.2.5/Fig-color.ad~ 2007-11-16 13:47:45.000000000 +0100
+++ xfig.3.2.5/Fig-color.ad 2007-11-16 13:47:52.000000000 +0100
@@ -93,7 +93,7 @@ Fig*sideruler.background: gray95
Fig*FigList*background: gray95
Fig*List*background: gray95
-Fig*Scrollbar.background: gray95
+! Fig*Scrollbar.background: gray95
Fig*Label.background: gray80
Fig*ind_box.background: gray80
@@ -104,8 +104,8 @@ Fig*button_form.update*foreground: red
Fig*upd_ctrl_form.upd_ctrl_btns*shadowWidth: 2
!##### Shadows
-Fig*shadowWidth: 1
-Fig*Label.shadowWidth: 1
+!Fig*shadowWidth: 1
+!Fig*Label.shadowWidth: 1
Fig*horizontal.shadowWidth: 2
Fig*Scrollbar.shadowWidth: 2
! no shadows for update indicators
@@ -136,3 +136,15 @@ Fig*color_box*topShadowPixel: gray80
Fig*toggle*bottomShadowPixel: gray80
Fig*toggle*topShadowPixel: gray50
+
+! repare damage done to scrollbar shadows non color resources file
+
+Fig*horizontal.topShadowPixel: gray95
+Fig*horizontal.bottomShadowPixel: gray50
+Fig*horizontal.topShadow: gray95
+Fig*horizontal.bottomShadow: gray50
+
+Fig*Scrollbar.topShadow: gray95
+Fig*Scrollbar.bottomShadow: gray50
+Fig*Scrollbar.topShadowPixel: gray95
+Fig*Scrollbar.bottomShadowPixel: gray50

View file

@ -0,0 +1,34 @@
diff -up xfig.3.2.5/Imakefile.no-Xaw3d xfig.3.2.5/Imakefile
--- xfig.3.2.5/Imakefile.no-Xaw3d 2007-11-16 10:38:18.000000000 +0100
+++ xfig.3.2.5/Imakefile 2007-11-16 10:38:49.000000000 +0100
@@ -50,16 +50,16 @@ XAPPLOADDIR = /usr/share/X11/app-default
XCOMM Uncomment the following definition for XAW3D if you want to use
XCOMM the 3d Athena Widget Set (highly recommended!)
-XCOMM #define XAW3D
+#define XAW3D
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
diff -up xfig.3.2.5/w_library.c.no-Xaw3d xfig.3.2.5/w_library.c
--- xfig.3.2.5/w_library.c.no-Xaw3d 2006-04-03 18:27:30.000000000 +0200
+++ xfig.3.2.5/w_library.c 2007-11-16 10:38:18.000000000 +0100
@@ -1029,6 +1029,7 @@ make_library_menu(Widget parent, char *n
Widget menu, entry;
#ifndef XAW3D1_5E
Widget submenu;
+#else
char submenu_name[200];
#endif /* XAW3D1_5E */
char menu_name[200];

12
xfig-3.2.5-quiet.patch Normal file
View file

@ -0,0 +1,12 @@
diff -up xfig.3.2.5/w_drawprim.c~ xfig.3.2.5/w_drawprim.c
--- xfig.3.2.5/w_drawprim.c~ 2007-11-16 13:21:55.000000000 +0100
+++ xfig.3.2.5/w_drawprim.c 2007-11-16 13:21:55.000000000 +0100
@@ -512,7 +512,7 @@ void init_gc(void)
gccache[ERASE] = makegc(ERASE, x_fg_color.pixel, x_bg_color.pixel);
gccache[INV_PAINT] = makegc(INV_PAINT, x_fg_color.pixel, x_bg_color.pixel);
/* parse any grid color spec */
-fprintf(stderr,"color = '%s'\n",appres.grid_color);
+/* fprintf(stderr,"color = '%s'\n",appres.grid_color); */
XParseColor(tool_d, tool_cm, appres.grid_color, &tmp_color);
if (XAllocColor(tool_d, tool_cm, &tmp_color)==0) {
fprintf(stderr,"Can't allocate color for grid \n");

79
xfig-3.2.5-urwfonts.patch Normal file
View file

@ -0,0 +1,79 @@
--- xfig.3.2.4/u_fonts.c 2002-09-09 13:36:58.000000000 -0400
+++ new-xfig-3.2.4/u_fonts.c 2006-10-11 00:29:07.000000000 -0400
@@ -22,41 +22,41 @@
/* X11 font names */
struct _xfstruct x_fontinfo[NUM_FONTS] = {
- {"-*-times-medium-r-normal--", (struct xfont*) NULL},
- {"-*-times-medium-i-normal--", (struct xfont*) NULL},
- {"-*-times-bold-r-normal--", (struct xfont*) NULL},
- {"-*-times-bold-i-normal--", (struct xfont*) NULL},
- {"-*-avantgarde-book-r-normal--", (struct xfont*) NULL},
- {"-*-avantgarde-book-o-normal--", (struct xfont*) NULL},
- {"-*-avantgarde-demi-r-normal--", (struct xfont*) NULL},
- {"-*-avantgarde-demi-o-normal--", (struct xfont*) NULL},
- {"-*-bookman-light-r-normal--", (struct xfont*) NULL},
- {"-*-bookman-light-i-normal--", (struct xfont*) NULL},
- {"-*-bookman-demi-r-normal--", (struct xfont*) NULL},
- {"-*-bookman-demi-i-normal--", (struct xfont*) NULL},
- {"-*-courier-medium-r-normal--", (struct xfont*) NULL},
- {"-*-courier-medium-o-normal--", (struct xfont*) NULL},
- {"-*-courier-bold-r-normal--", (struct xfont*) NULL},
- {"-*-courier-bold-o-normal--", (struct xfont*) NULL},
- {"-*-helvetica-medium-r-normal--", (struct xfont*) NULL},
- {"-*-helvetica-medium-o-normal--", (struct xfont*) NULL},
- {"-*-helvetica-bold-r-normal--", (struct xfont*) NULL},
- {"-*-helvetica-bold-o-normal--", (struct xfont*) NULL},
- {"-*-helvetica-medium-r-narrow--", (struct xfont*) NULL},
- {"-*-helvetica-medium-o-narrow--", (struct xfont*) NULL},
- {"-*-helvetica-bold-r-narrow--", (struct xfont*) NULL},
- {"-*-helvetica-bold-o-narrow--", (struct xfont*) NULL},
- {"-*-new century schoolbook-medium-r-normal--", (struct xfont*) NULL},
- {"-*-new century schoolbook-medium-i-normal--", (struct xfont*) NULL},
- {"-*-new century schoolbook-bold-r-normal--", (struct xfont*) NULL},
- {"-*-new century schoolbook-bold-i-normal--", (struct xfont*) NULL},
- {"-*-palatino-medium-r-normal--", (struct xfont*) NULL},
- {"-*-palatino-medium-i-normal--", (struct xfont*) NULL},
- {"-*-palatino-bold-r-normal--", (struct xfont*) NULL},
- {"-*-palatino-bold-i-normal--", (struct xfont*) NULL},
- {"-*-symbol-medium-r-normal--", (struct xfont*) NULL},
- {"-*-itc zapf chancery-medium-i-normal--", (struct xfont*) NULL},
- {"-*-itc zapf dingbats-*-*-*--", (struct xfont*) NULL},
+ {"-urw-nimbus roman no9 l-medium-r-normal--", (struct xfont*) NULL},
+ {"-urw-nimbus roman no9 l-medium-i-normal--", (struct xfont*) NULL},
+ {"-urw-nimbus roman no9 l-bold-r-normal--", (struct xfont*) NULL},
+ {"-urw-nimbus roman no9 l-bold-i-normal--", (struct xfont*) NULL},
+ {"-urw-urw gothic l-medium-r-normal--", (struct xfont*) NULL},
+ {"-urw-urw gothic l-medium-o-normal--", (struct xfont*) NULL},
+ {"-urw-urw gothic l-semibold-r-normal--", (struct xfont*) NULL},
+ {"-urw-urw gothic l-semibold-o-normal--", (struct xfont*) NULL},
+ {"-urw-urw bookman l-medium-r-normal--", (struct xfont*) NULL},
+ {"-urw-urw bookman l-medium-i-normal--", (struct xfont*) NULL},
+ {"-urw-urw bookman l-bold-r-normal--", (struct xfont*) NULL},
+ {"-urw-urw bookman l-bold-i-normal--", (struct xfont*) NULL},
+ {"-urw-nimbus mono l-medium-r-normal--", (struct xfont*) NULL},
+ {"-urw-nimbus mono l-medium-o-normal--", (struct xfont*) NULL},
+ {"-urw-nimbus mono l-bold-r-normal--", (struct xfont*) NULL},
+ {"-urw-nimbus mono l-bold-o-normal--", (struct xfont*) NULL},
+ {"-urw-nimbus sans l-medium-r-normal--", (struct xfont*) NULL},
+ {"-urw-nimbus sans l-medium-i-normal--", (struct xfont*) NULL},
+ {"-urw-nimbus sans l-bold-r-normal--", (struct xfont*) NULL},
+ {"-urw-nimbus sans l-bold-i-normal--", (struct xfont*) NULL},
+ {"-urw-nimbus sans l condensed-medium-r-condensed--", (struct xfont*) NULL},
+ {"-urw-nimbus sans l condensed-medium-i-condensed--", (struct xfont*) NULL},
+ {"-urw-nimbus sans l condensed-bold-r-condensed--", (struct xfont*) NULL},
+ {"-urw-nimbus sans l condensed-bold-i-condensed--", (struct xfont*) NULL},
+ {"-urw-century schoolbook l-medium-r-normal--", (struct xfont*) NULL},
+ {"-urw-century schoolbook l-medium-i-normal--", (struct xfont*) NULL},
+ {"-urw-century schoolbook l-bold-r-normal--", (struct xfont*) NULL},
+ {"-urw-century schoolbook l-bold-i-normal--", (struct xfont*) NULL},
+ {"-urw-urw palladio l-medium-r-normal--", (struct xfont*) NULL},
+ {"-urw-urw palladio l-medium-i-normal--", (struct xfont*) NULL},
+ {"-urw-urw palladio l-bold-r-normal--", (struct xfont*) NULL},
+ {"-urw-urw palladio l-bold-i-normal--", (struct xfont*) NULL},
+ {"-urw-standard symbols l-medium-r-normal--", (struct xfont*) NULL},
+ {"-urw-urw chancery l-medium-i-normal--", (struct xfont*) NULL},
+ {"-urw-dingbats-medium-r-normal--", (struct xfont*) NULL},
};
/* Use the following font names for any font that doesn't exist in the table above.

View file

@ -1,7 +1,6 @@
[Desktop Entry]
Encoding=UTF-8
Categories=Application;Graphics;X-Red-Hat-Extra;
X-Desktop-File-Install-Version=0.2
Categories=Graphics;
MimeType=image/fig;image/x-xfig;
Exec=xfig
Icon=xfig
@ -17,7 +16,7 @@ Comment[ca]=Aplicació de dibuix Xfig
Comment[cs]=Aplikace pro kreslení vektorových obrázků
Comment[da]=Xfig tegneprogram
Comment[de]=Xfig-Zeichenprogramm
Comment[el]=Εφαρμογή ζωγραφικής Xfig
Comment[el]=Xfig
Comment[eo]=Desegnilo "Xfig"
Comment[es]=Aplicación de diseño vectorial (objetos)
Comment[et]=XFig joonistusprogramm
@ -44,5 +43,5 @@ Comment[sr]=Xfig prgram za vektorsko crtanje
Comment[sv]=Xfig ritprogram
Comment[ta]=Xfig Ũþø ÀÂýÀ¡Î
Comment[tr]=Xfig çizim uygulaması
Comment[uk]=Програма для утворення зображень Xfig
Comment[uk]=Xfig
Comment[zh_CN.GB2312]=Xfig

10
xfig.sh Normal file
View file

@ -0,0 +1,10 @@
#!/bin/bash
if [ -x /usr/bin/xfig-Xaw3d ]; then
cd /usr/share/X11/app-defaults
xrdb -merge Fig-color 2> /dev/null
cd - > /dev/null
exec xfig-Xaw3d "$@"
else
exec xfig-plain "$@"
fi

151
xfig.spec
View file

@ -1,15 +1,16 @@
%define app_defaults_dir %{_datadir}/X11/app-defaults
Summary: An X Window System tool for drawing basic vector graphics.
Summary: An X Window System tool for drawing basic vector graphics
Name: xfig
Version: 3.2.5
Release: 1%{?dist}
License: Freeware
Release: 5%{?dist}
License: MIT
Group: Applications/Multimedia
URL: http://www.xfig.org/
Source0: http://www.xfig.org/xfigdist/xfig.%{version}.full.tar.gz
Source1: xfig.png
Source2: xfig.desktop
Source3: xfig.sh
Patch0: xfig-3.2.4-redhat.patch
Patch1: xfig-3.2.5-fhs.patch
@ -17,12 +18,10 @@ Patch2: xfig-3.2.5-mkstemp.diff
Patch7: xfig.3.2.5-modularX.patch
Patch8: xfig-3.2.5-pdfviewer.patch
Patch9: xfig.3.2.5-Xaw3d.patch
Requires: transfig >= 1:3.2.5
Requires: evince
Requires: ImageMagick
Requires: aspell
Requires: htmlview
Patch10: xfig-3.2.5-enable-Xaw3d.patch
Patch11: xfig-3.2.5-color-resources.patch
Patch12: xfig-3.2.5-quiet.patch
Patch13: xfig-3.2.5-urwfonts.patch
BuildRequires: libjpeg-devel
BuildRequires: libpng-devel
@ -36,9 +35,14 @@ BuildRequires: libXi-devel
BuildRequires: libXmu-devel
BuildRequires: libXpm-devel
BuildRequires: libXt-devel
BuildRequires: Xaw3d-devel
BuildRequires: desktop-file-utils
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: %{name}-common = %{version}-%{release}
Provides: %{name}-executable = %{version}-%{release}
%description
Xfig is an X Window System tool for creating basic vector graphics,
including bezier curves, lines, rulers and more. The resulting
@ -49,6 +53,33 @@ PostScript, LaTeX).
You should install xfig if you need a simple program to create vector
graphics.
%package Xaw3d
Summary: Xaw3d version of xfig
Group: Applications/Multimedia
# for xrdb
Requires: xorg-x11-server-utils
Requires: %{name}-common = %{version}-%{release}
Provides: %{name}-executable = %{version}-%{release}
%description Xaw3d
Xaw3d version of xfig, an X Window System tool for creating basic vector
graphics, including bezier curves, lines, rulers and more. The Xaw3d version
is a more modern / prettier looking version of the normal xfig program, other
then that it is identical.
%package common
Summary: Common xfig files
Group: Applications/Multimedia
Requires: transfig >= 1:3.2.5, xdg-utils, aspell, urw-fonts
# So that this will get uninstalled together with xfig / xfig-Xaw3d
Requires: %{name}-executable = %{version}-%{release}
%description common
Files common to both the plain Xaw and the Xaw3d version of xfig.
%prep
%setup -q -n xfig.%{version}
%patch0 -p1 -b .redhat
@ -57,43 +88,113 @@ graphics.
%patch7 -p1 -b .modularX
%patch8 -p1 -b .pdfviewer
%patch9 -p1 -b .Xaw3d
%patch10 -p1 -b .no-Xaw3d
%patch11 -p1 -b .color-resources
%patch12 -p1 -b .quiet
%patch13 -p1 -b .urw
ln -nfs Doc/xfig.man xfig.man
find -type f -print0 | xargs -0 chmod -x
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
mv $i.UTF-8 $i
done
%build
# First build the Xaw3d version
xmkmf
ln -nfs Doc/xfig.man xfig.man
make XFIGDOCDIR=%{_docdir}/%{name}-%{version}
make XFIGDOCDIR=%{_docdir}/%{name}-%{version} \
CDEBUGFLAGS="$RPM_OPT_FLAGS -fno-strength-reduce -fno-strict-aliasing"
mv xfig xfig-Xaw3d
make distclean
# And then build the normal Xaw version
mv Imakefile.no-Xaw3d Imakefile
xmkmf
make XFIGDOCDIR=%{_docdir}/%{name}-%{version} \
CDEBUGFLAGS="$RPM_OPT_FLAGS -fno-strength-reduce -fno-strict-aliasing"
%install
rm -rf %{buildroot}
make DESTDIR=%{buildroot} \
XFIGDOCDIR=%{_docdir}/%{name}-%{version} \
XAPPLOADDIR=%{app_defaults_dir} \
CONFDIR=%{_datadir}/X11 \
install install.all
make DESTDIR=%{buildroot} XFIGDOCDIR=%{_docdir}/%{name}-%{version} install.all
mkdir -p %{buildroot}%{_datadir}/pixmaps \
# 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}
mkdir -p %{buildroot}%{_datadir}/icons/hicolor/32x32/apps \
%{buildroot}%{_datadir}/applications
install -m 644 %{SOURCE1} %{buildroot}%{_datadir}/pixmaps
install -m 644 %{SOURCE2} %{buildroot}%{_datadir}/applications/net-xfig.desktop
install -p -m 644 %{SOURCE1} %{buildroot}%{_datadir}/icons/hicolor/32x32/apps
desktop-file-install --vendor fedora \
--dir %{buildroot}%{_datadir}/applications \
%{SOURCE2}
# remove app-defaults symlink which gets installed
rm %{buildroot}%{_prefix}/lib*/X11/app-defaults
rm -fr %{buildroot}%{_prefix}/lib*
%clean
rm -rf %{buildroot}
%post common
update-desktop-database &> /dev/null || :
touch --no-create %{_datadir}/icons/hicolor || :
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
fi
%postun common
update-desktop-database &> /dev/null || :
touch --no-create %{_datadir}/icons/hicolor || :
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
fi
%files
%defattr(-,root,root)
%defattr(-,root,root,-)
%{_bindir}/%{name}-plain
%files Xaw3d
%defattr(-,root,root,-)
%{_bindir}/%{name}-Xaw3d
%files common
%defattr(-,root,root,-)
%doc %{_docdir}/%{name}-%{version}
%attr(0755,root,root) %{_bindir}/*
%{_datadir}/%{name}/*
%{_bindir}/%{name}
%{_datadir}/%{name}
%{_mandir}/*/*
%{_datadir}/pixmaps/%{name}.png
%{app_defaults_dir}/*
%{_datadir}/applications/*
%{_datadir}/applications/fedora-%{name}.desktop
%{_datadir}/icons/hicolor/32x32/apps/%{name}.png
%changelog
* Fri Nov 16 2007 Hans de Goede <j.w.r.degoede@hhs.nl> 3.2.5-5
- Also compile a version against Xaw3d instead of plain Xaw, available in the
new xfig-Xaw3d package
- Various specfile cleanups for packaging guidelines compliance
- Remove spurious executable permissions on various files (bz 247424)
- Apply patch fixing problems with xfig not finding fonts (bz 210278)
* Thu Nov 15 2007 Than Ngo <than@redhat.com> 3.2.5-4
- fix #201992, xfig crashes in the edit function
* Thu Nov 15 2007 Than Ngo <than@redhat.com> 3.2.5-3
- fix #201992, xfig crashes in the edit function
* Fri Oct 05 2007 Than Ngo <than@redhat.com> - 3.2.5-2
- rh#313321, use xdg-open
* Mon Apr 16 2007 Than Ngo <than@redhat.com> - 3.2.5-1.fc7
- 3.2.5