SHA256
1
0
forked from pool/xfig
xfig/xfig.spec

303 lines
12 KiB
RPMSpec

#
# spec file for package xfig (Version 3.2.4)
#
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
Name: xfig
BuildRequires: libjpeg-devel libpng-devel netpbm update-desktop-files xaw3d-devel xorg-x11 xorg-x11-devel
License: Any permissive
Group: Productivity/Graphics/Vector Editors
Provides: xfig.3.2.3d
Requires: transfig netpbm ghostscript-fonts-std
Autoreqprov: on
Version: 3.2.4
Release: 145
Summary: Facility for Interactive Generation of Figures under the X Window System
Url: http://www.xfig.org/
Source: xfig.%{version}.tar.bz2
Source1: font-test.fig
Source2: browser
Source3: xfig.sh
Source4: xfig.desktop
Patch0: xfig.%{version}.dif
Patch1: xfig.%{version}-urw-fonts.dif
Patch2: xfig.3.2.3d-xim.dif
Patch3: xfig.3.2.3d-international-std-fonts.dif
Patch4: xfig.3.2.3d-xcolor.dif
Patch5: xfig-%{version}-mkstemp.dif
Patch6: xfig.%{version}-null.dif
Patch7: xfig.%{version}-quiet.dif
Patch8: xfig.%{version}-gcc4.dif
Patch9: xfig.%{version}-locale.dif
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%{expand: %%global _exec_prefix %(type -p pkg-config &>/dev/null && pkg-config --variable prefix x11 || echo /usr/X11R6)}
%if "%_exec_prefix" == "/usr/X11R6"
%global _mandir %{_exec_prefix}/man
%define _x11data %{_exec_prefix}/lib/X11
%define _data $(LIBDIR)
%define _appdefdir %{_x11data}/app-defaults
%else
%define _x11data %{_datadir}/X11
%define _data $(SHAREDIR)
%define _appdefdir %{_x11data}/app-defaults
%endif
%description
Xfig is a menu-driven tool that allows the user to draw and manipulate
objects interactively in an X Window System window. The resulting
pictures can be saved, printed on PostScript printers, or converted to
a variety of other formats (to allow inclusion in LaTeX documents, for
example).
Documentation: /usr/share/doc/packages/xfig & man xfig
Examples: /usr/share/doc/packages/xfig/TheExamples
Authors:
--------
Anthony Dekker <dekker@ACM.org>
Brian V. Smith <bvsmith@lbl.gov>
Jim Daley <jdaley@cix.compulink.co.uk>
Ross Martin <martin@trcsun3.eas.asu.edu>
Uwe Bonnes <bon@lte.e-technik.uni-erlangen.de>
%prep
%setup -q -n xfig.%{version}
%patch0 -p0
%patch1 -p0 -b .urw-fonts
%patch2 -p1 -b .xim
%patch3 -p1 -b .international-std-fonts
%patch4 -p0 -b .xcolor
%patch5 -p1 -b .security
%patch6 -p0 -b .null
%patch7 -p0 -b .quiet
%patch8 -p0 -b .gcc4
%patch9 -p0 -b .locale
cp $RPM_SOURCE_DIR/font-test.fig .
xmkmf -a -D_DATA='%{_data}'
%build
make CCOPTIONS="-fno-strict-aliasing $RPM_OPT_FLAGS -w"
%install
mkdir -p %{buildroot}%{_bindir}
mkdir -p %{buildroot}%{_x11data}/xfig
mkdir -p %{buildroot}%{_appdefdir}
mkdir -p %{buildroot}%{_defaultdocdir}/%{name}/Libraries/Examples
rm -rf %{buildroot}%{_defaultdocdir}/%{name}/Examples
ln -sf Libraries/Examples \
%{buildroot}%{_defaultdocdir}/%{name}/TheExamples
ln -sf %{_defaultdocdir}/%{name}/Libraries \
%{buildroot}%{_x11data}/xfig/Libraries
ln -sf %{_defaultdocdir}/%{name}/html \
%{buildroot}%{_x11data}/xfig/
ln -sf %{_defaultdocdir}/%{name}/xfig.html \
%{buildroot}%{_x11data}/xfig/
ln -sf %{_defaultdocdir}/%{name}/xfig-howto.pdf \
%{buildroot}%{_x11data}/xfig/
install -m 0755 %{SOURCE2} %{buildroot}%{_x11data}/xfig/
make DESTDIR=%{buildroot} install
make DESTDIR=%{buildroot} install.man
mkdir -p %{buildroot}/%{_docdir}/%{name}
cp -pr README FIGAPPS Libraries font-test.fig %{buildroot}/%{_docdir}/%{name}
cp -pr Doc/FORMAT* Doc/TODO Doc/html Doc/*.pdf Doc/*.html %{buildroot}/%{_docdir}/%{name}
find %{buildroot}%{_defaultdocdir}/%{name}/ -name '*.bak' | xargs -r rm
find %{buildroot}%{_defaultdocdir}/%{name}/ -type f -print0 | xargs -0 chmod 644
mkdir -p %{buildroot}%{_datadir}/pixmaps
cp -p %{name}.png %{buildroot}%{_datadir}/pixmaps/
mv %{buildroot}%{_bindir}/xfig %{buildroot}%{_bindir}/xfig.bin
sed 's|@@BINDIR@@|%{_bindir}|' < %{SOURCE3} > %{buildroot}%{_bindir}/xfig
chmod 0755 %{SOURCE3} %{buildroot}%{_bindir}/xfig
install -d %{buildroot}/usr/share/applications
sed 's|@@BINDIR@@|%{_bindir}|' < %{SOURCE4} > %{buildroot}/usr/share/applications/xfig.desktop
chmod 0644 %{buildroot}/usr/share/applications/xfig.desktop
%suse_update_desktop_file xfig VectorGraphics &> /dev/null
%files
%defattr(-,root,root,755)
%doc %{_docdir}/%{name}
%{_datadir}/applications/xfig.desktop
%{_datadir}/pixmaps/xfig.png
%{_x11data}/xfig
%{_bindir}/xfig*
%config %{_appdefdir}/Fig
%config %{_appdefdir}/Fig-color
%doc %{_mandir}/man1/xfig.1x.gz
%changelog
* Fri Jun 01 2007 - dmueller@suse.de
- fix buildrequires
* Thu Nov 16 2006 - werner@suse.de
- Set LC_NUMERIC to POSIX before print or export data (bug #213942)
* Tue Nov 07 2006 - ro@suse.de
- fix docu permissions
* Mon Jul 31 2006 - werner@suse.de
- Use Imake defines for LIBDIR/SHAREDIR switch
* Fri Jul 28 2006 - werner@suse.de
- Make it build with X11R7
* Wed Feb 15 2006 - stbinner@suse.de
- add GenericName to .desktop file
* Wed Jan 25 2006 - mls@suse.de
- converted neededforbuild to BuildRequires
* Thu Oct 06 2005 - werner@suse.de
- Make URW fonts an option, use Adobe as fallback
* Wed Aug 31 2005 - werner@suse.de
- Fix single byte buffer overflow due pedantic gcc4 (bug #114344)
* Mon Aug 29 2005 - ro@suse.de
- use own desktop file with icon (#113672)
* Tue Mar 01 2005 - meissner@suse.de
- fixed font struct definitions to be after struct
definition for gcc4.
- -Wno-all is actually -w.
* Thu Aug 26 2004 - werner@suse.de
- Allow arguments in the wrapper script for xfig
* Wed Aug 25 2004 - werner@suse.de
- Avoid nasty warnings about not found actions
- Use wrapper script to avoid UTF-8 for the program its self
* Fri Aug 13 2004 - werner@suse.de
- Filelist: Add pixmap of xfig (#43698)
- Package docu: correct dir name in PDB (#43698)
* Fri May 28 2004 - adrian@suse.de
- fix invalid Categories (#41338)
* Tue Apr 06 2004 - werner@suse.de
- Add application desktop file for xfig (bug #38507 ???)
* Mon Mar 22 2004 - werner@suse.de
- Fix NULL pointer access (bug #36650)
* Thu Mar 18 2004 - werner@suse.de
- Remove .bak's from file list (bug #36311)
* Thu Mar 11 2004 - werner@suse.de
- Add browser script for detection of varisou web browsers (#35669)
- Add security fix for temporary files
- Fix doc location
- Avoid extrem long build logs
* Tue Feb 03 2004 - werner@suse.de
- Update to 3.2.4
* Sat Jan 10 2004 - adrian@suse.de
- build as user
* Tue Jul 22 2003 - hare@suse.de
- Fixed function declaration.
* Fri Jun 13 2003 - kukuk@suse.de
- Add workaround for brp-symlink script
* Thu Jun 12 2003 - kukuk@suse.de
- Use BuildRoot
- Fix filelist
* Fri May 09 2003 - mfabian@suse.de
- fix Bugzilla #26734: extend the fontsets in
xfig-international-std-fonts.dif to always match something to
avoid warnings "Missing charsets in String to FontSet conversion"
even if only few fonts are installed.
* Thu May 08 2003 - mfabian@suse.de
- adapt font names in xfig.3.2.3d-urw-fonts.dif to the names
as they are auto generated by mkfontscale since SuSE Linux 8.2.
- don't print warnings concerning input styles when compose is
used, input styles don't matter for compose.
* Mon Mar 18 2002 - mfabian@suse.de
- fix bug #15077, don't exit when XSetLocaleModifiers("") fails,
this would make it impossible to use the '-international' option
unless some input server is running, which is nonsense for most
non-Asian languages e.g. for Czech.
- enable '-international' automatically when
NULL == strcasestr(nl_langinfo(CODESET),"ISO-8859-1")
(i.e. enable it automatically for Czech as well).
- use better fonts for on screen display of Times-Roman and
Times-Bold when '-international' is used.
* Mon Mar 18 2002 - werner@suse.de
- Fix bug # 15076: add link /usr/X11R6/lib/X11/xfig/html/
pointing to /usr/share/doc/packages/xfig/html/,
add link /usr/X11R6/lib/X11/xfig/xfig.html pointing to
/usr/share/doc/packages/xfig/xfig.html, add link
/usr/X11R6/lib/X11/xfig/xfig-howto.pdf pointing to
/usr/share/doc/packages/xfig/xfig-howto.pdf
* Thu Mar 07 2002 - werner@suse.de
- Fix bug # 14588: add link /usr/X11R6/lib/X11/xfig/Libraries
pointing to /usr/share/doc/packages/xfig/Examples/Libraries
* Fri Feb 22 2002 - mfabian@suse.de
- use the URW fonts for display on X11 instead of bitmap fonts.
Using the URW fonts for display on X11 *and* for printing with
Ghostscript has the advantage that printout looks much more
similar to the preview on X11. Much more WYSIWYG now.
On top of that, the bitmap fonts could not be scaled anymore
because we now have ":unscaled" added to every directory in
the font path which contains only bitmap fonts. Therefore
changing the font size in xfig ceased to work on X11, it worked
only in the PostScript output. Because of this the X11 display
was very different from the PostScript output.
- add font-test.fig as a sample file to test the correct display
of the URW fonts.
- add xfig.3.2.3d-xim.dif to fix XIM for Japanese and Korean.
(didn't work at all previously because a call to
XSetLocaleModifiers() was missing)
- switch on the '-international' option for all locales using
codesets different from 'ISO-8859-*' on by default.
- remove Korean app-defaults. The only reason for it's existence
was to set 'Fig.international: true' apart from that it was
identical to the standard app-defaults file. And because of
some bug (which I still don't understand) it wasn't read anyway
and therefore achieved nothing.
* Fri Feb 01 2002 - ro@suse.de
- changed neededforbuild <libpng> to <libpng-devel-packages>
* Tue Dec 11 2001 - werner@suse.de
- Add forgotten examples
- Add forgotten docs
* Mon Dec 10 2001 - werner@suse.de
- Update to version 3.2.3d
* Tue May 08 2001 - mfabian@suse.de
- bzip2 sources
* Thu Jan 25 2001 - violiet@suse.de
- added Korean resource.
* Thu Dec 14 2000 - werner@suse.de
- Fixed the improve of the object searching at higher zooms (bug#4672)
* Tue Oct 10 2000 - werner@suse.de
- Move XtSetLanguageProc after XtAppInitialize because otherwise
LC_NUMERIC will be overwritten by LANG.
* Fri Sep 15 2000 - werner@suse.de
- Update to 3.2.3c
* include bug fix for f_read.c
* Enable international support at compile time but disable
it at run time (works only for Japanese and Korean).
User could use -international
* Mention -international in the manual and html page
* Fri Jun 30 2000 - werner@suse.de
- Workaround for un-initialized label in sme_bsb class
* Wed May 31 2000 - werner@suse.de
- use %%{_defaultdocdir}
* Mon Mar 27 2000 - werner@suse.de
- Avoid sparc nasties
* Fri Mar 24 2000 - werner@suse.de
- Update to new version 3.2.3a
- Add patch for special jpeg version
- Change some minor shadow colorings
* Mon Sep 13 1999 - bs@suse.de
- ran old prepare_spec on spec file to switch to new prepare_spec.
* Wed Apr 07 1999 - werner@suse.de
- Use the macro __need___va_list instead of moving varargs.h
- Integrate the cut+paste patch
- Use colored XPM icon
* Fri Mar 05 1999 - ro@suse.de
- move varargs topward to make it compile
* Wed Dec 09 1998 - max@suse.de
- added whole /usr/X11R6/lib/X11/xfig path to the file list, to get
online documentation and cliparts into the rpm package.
* Fri Oct 30 1998 - ro@suse.de
- update to 3.2.2
* Thu Sep 17 1998 - ro@suse.de
- don't redeclare sys_errlist for glibc
* Mon Oct 20 1997 - ro@suse.de
- ready for autobuild
* Tue May 27 1997 - florian@suse.de
- update to version 3.2
- update to version 3.2.0-beta3
- add more docu and examples
* Thu Jan 02 1997 - florian@suse.de
- changed to use cm as default metric and not inches