diff --git a/.gitignore b/.gitignore index 96f3150..6486e73 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ xfig.3.2.5b.full.tar.gz /xfig-icons.tar.gz /xfig.3.2.5c.full.tar.gz /xfig_3.2.5.c-8.debian.tar.xz +/xfig-full-3.2.6.tar.xz diff --git a/sources b/sources index ee09d18..143c8aa 100644 --- a/sources +++ b/sources @@ -1,3 +1,2 @@ -210851330fa4bb3581bec1f8448a4db8 xfig.3.2.5c.full.tar.gz +4c510265d87725abc3d678d6cb638d02 xfig-full-3.2.6.tar.xz f58e3bde288d623c826e1784ebb45de0 xfig-icons.tar.gz -214c32741f82fede789ae0e0ee06dc41 xfig_3.2.5.c-8.debian.tar.xz diff --git a/xfig-3.2.5-Imakefile.patch b/xfig-3.2.5-Imakefile.patch deleted file mode 100644 index 644cbc8..0000000 --- a/xfig-3.2.5-Imakefile.patch +++ /dev/null @@ -1,40 +0,0 @@ -diff -up xfig.3.2.5b/Imakefile.fed xfig.3.2.5b/Imakefile ---- xfig.3.2.5b/Imakefile.fed 2012-08-12 16:54:00.102765148 +0200 -+++ xfig.3.2.5b/Imakefile 2012-08-12 16:57:32.883846828 +0200 -@@ -45,7 +45,7 @@ XCOMM Don't set the DESTDIR variable unl - XCOMM different tree than the "correct" tree that your X system expects. The usual - XCOMM purpose of DESTDIR is to test an install process by installing in a benign area. - --XCOMM XAPPLOADDIR = /home/user/xfig -+XAPPLOADDIR = /usr/share/X11/app-defaults - - XCOMM Comment out the following definition for XAW3D if you don't to want to use - XCOMM the 3d Athena Widget Set -@@ -162,23 +162,22 @@ XCOMM uncomment the following line if yo - XCOMM inline functions. With the "INLINE" keyword, you should notice that - XCOMM the display will be a bit faster in complex figures - --XCOMM USEINLINE = -DUSE_INLINE -+USEINLINE = -DUSE_INLINE - - XCOMM use (and change) the following if you want the multi-key data base file - XCOMM somewhere other than the standard X11 library directory - XCOMM be sure to comment out the second copy of XFIGLIBDIR if you use this one - XCOMM XFIGLIBDIR = $(LIBDIR) - - XCOMM use this if you want the multi-key data base file in the standard X11 tree --XFIGLIBDIR = $(LIBDIR)/xfig -+XFIGLIBDIR = /usr/share/xfig - - XCOMM XFIGDOCDIR tells where the html and pdf documentation should go --XCOMM XFIGDOCDIR = $(DOCDIR)/xfig --XFIGDOCDIR = /usr/local/xfig/doc -+XFIGDOCDIR = /usr/share/doc/xfig - - XCOMM MANDIR tells where the standard man pages should go (no need to change it - XCOMM if you want the man pages installed in the standard place on your system --MANDIR = $(MANSOURCEPATH)$(MANSUFFIX) -+MANDIR = /usr/share/man/man1 - XCOMM MANDIR = /usr/local/xfig/man - - XCOMM If your system doesn't have strstr undefine the following definition diff --git a/xfig-3.2.5-disable-Xaw3d.patch b/xfig-3.2.5-disable-Xaw3d.patch deleted file mode 100644 index 3b5b8fc..0000000 --- a/xfig-3.2.5-disable-Xaw3d.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff -up xfig.3.2.5a/Imakefile.with-Xaw3d xfig.3.2.5a/Imakefile ---- xfig.3.2.5c/Imakefile.with-Xaw3d 2013-11-27 22:24:46.000000000 +0100 -+++ xfig.3.2.5c/Imakefile 2013-11-27 22:24:06.000000000 +0100 -@@ -50,7 +50,7 @@ XAPPLOADDIR = /usr/share/X11/app-default - XCOMM Comment out the following definition for XAW3D if you don't to want to use - XCOMM the 3d Athena Widget Set - --#define XAW3D -+XCOMM #define XAW3D - - #ifdef XAW3D - XAWLIB = -lXaw3d -@@ -60,7 +60,7 @@ XCOMM Uncomment the following if you hav - XCOMM some new features, including "Tips", which replace xfig's "help balloons" - XCOMM NOTE: This is the default for many X systems now. - --#define XAW3D1_5E -+XCOMM #define XAW3D1_5E - - #ifdef XAW3D1_5E - DUSEXAW3D = -DXAW3D -DXAW3D1_5E diff --git a/xfig-3.2.5-libpng16.patch b/xfig-3.2.5-libpng16.patch deleted file mode 100644 index 1bb5eb5..0000000 --- a/xfig-3.2.5-libpng16.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/f_readpng.c 2014-09-15 13:25:26.290813563 +0200 -+++ a/f_readpng.c 2014-09-15 14:04:10.241297027 +0200 -@@ -90,8 +90,8 @@ - png_get_IHDR(png_ptr, info_ptr, &w, &h, &bit_depth, &color_type, - &interlace_type, &compression_type, &filter_type); - -- png_fixed_point gamma = 0.45; -- png_get_gAMA_fixed(png_ptr,info_ptr,&gamma); -+ double gamma = 0.45455; -+ png_get_gAMA(png_ptr,info_ptr,&gamma); - png_set_gamma(png_ptr, 2.2, gamma); - - if (png_get_valid(png_ptr,info_ptr,PNG_INFO_bKGD)) { diff --git a/xfig-3.2.5-urwfonts.patch b/xfig-3.2.5-urwfonts.patch index 7bc766b..82ca561 100644 --- a/xfig-3.2.5-urwfonts.patch +++ b/xfig-3.2.5-urwfonts.patch @@ -1,5 +1,5 @@ ---- 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 +--- xfig.3.2.4/src/u_fonts.c 2002-09-09 13:36:58.000000000 -0400 ++++ xfig-3.2.4/src/u_fonts.c 2006-10-11 00:29:07.000000000 -0400 @@ -22,41 +22,41 @@ /* X11 font names */ diff --git a/xfig-3.2.5a-default-apps.patch b/xfig-3.2.5a-default-apps.patch index b5d8d7c..0a8aa2f 100644 --- a/xfig-3.2.5a-default-apps.patch +++ b/xfig-3.2.5a-default-apps.patch @@ -1,19 +1,12 @@ -diff -up xfig.3.2.5c/Fig.ad.default xfig.3.2.5c/Fig.ad ---- xfig.3.2.5c/Fig.ad.default 2016-02-28 19:52:52.111911633 +0100 -+++ xfig.3.2.5c/Fig.ad 2016-02-28 19:54:23.936566220 +0100 -@@ -27,13 +27,11 @@ Fig.ghostscript: gs - - ! Browser - put your favorite browser here. - ! This is for viewing the xfig html reference. --! For firefox, this command will open the help pages in a running firefox, --! or start a new netscape if one isn't already running --Fig.browser: sensible-browser -+Fig.browser: xdg-open %f - - ! pdfviewer - put your favorite pdf viewer here. - ! This is for viewing the xfig how-to guide and man pages --Fig.pdfviewer: xfig-pdf-viewer -+Fig.pdfviewer: xdg-open %f - +diff -up xfig-3.2.6/app-defaults/Fig.in~ xfig-3.2.6/app-defaults/Fig.in +--- xfig-3.2.6/app-defaults/Fig.in~ 2016-07-23 23:12:46.000000000 +0200 ++++ xfig-3.2.6/app-defaults/Fig.in 2016-08-11 12:36:56.550555744 +0200 +@@ -34,7 +34,7 @@ Fig.pdfviewer: xdg-open %f ! Spell check program - put your favorite spelling check program here. ! It must write the misspelled words to standard output. + +-Fig.spellcheckcommand: spell %f ++Fig.spellcheckcommand: enchant -l %f + + ! delay before spinner automatically counts when pressed (milliseconds) + Fig.spinner_delay: 1000 diff --git a/xfig.appdata.xml b/xfig.appdata.xml index 7734eb1..de29687 100644 --- a/xfig.appdata.xml +++ b/xfig.appdata.xml @@ -18,14 +18,14 @@ graphics.

- http://www.xfig.org/ - http://xfig.org/userman/ + https://en.wikipedia.org/wiki/Xfig + http://epb.lbl.gov/xfig/ - http://xfig.org/userman/images/screen-image.png - http://xfig.org/userman/images/library-icon-view.png - http://xfig.org/userman/images/file-panel.png - http://xfig.org/userman/images/color-panel.png - http://xfig.org/userman/images/dimline-panel.png + http://epb.lbl.gov/xfig/images/screen-image.png + http://epb.lbl.gov/xfig/images/library-icon-view.png + http://epb.lbl.gov/xfig/images/file-panel.png + http://epb.lbl.gov/xfig/images/color-panel.png + http://epb.lbl.gov/xfig/images/dimline-panel.png jwrdegoede_at_fedoraproject.org diff --git a/xfig.sh b/xfig.sh deleted file mode 100644 index cc85396..0000000 --- a/xfig.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -if [ -x /usr/bin/xfig-Xaw3d ]; then - exec xfig-Xaw3d "$@" -else - exec xfig-plain "$@" -fi diff --git a/xfig.spec b/xfig.spec index 2eedf24..ac096d1 100644 --- a/xfig.spec +++ b/xfig.spec @@ -2,23 +2,17 @@ Summary: An X Window System tool for drawing basic vector graphics Name: xfig -Version: 3.2.5 -Release: 48.c%{?dist} +Version: 3.2.6 +Release: 1%{?dist} License: MIT -Group: Applications/Multimedia -URL: http://www.xfig.org/ -Source0: http://downloads.sourceforge.net/mcj/xfig.%{version}c.full.tar.gz +URL: https://en.wikipedia.org/wiki/Xfig +Source0: http://downloads.sourceforge.net/mcj/xfig-full-%{version}.tar.xz Source1: xfig-icons.tar.gz Source2: xfig.desktop -Source3: xfig.sh -Source4: xfig.appdata.xml -Source5: ftp://ftp.nluug.nl/pub/os/Linux/distr/debian/pool/main/x/xfig/xfig_3.2.5.c-8.debian.tar.xz +Source3: xfig.appdata.xml Patch0: xfig-3.2.5a-default-apps.patch -Patch1: xfig-3.2.5-Imakefile.patch -Patch2: xfig-3.2.5-disable-Xaw3d.patch -Patch3: xfig-3.2.5-urwfonts.patch -Patch4: xfig-3.2.5-libpng16.patch +Patch1: xfig-3.2.5-urwfonts.patch BuildRequires: libjpeg-devel BuildRequires: libpng-devel @@ -36,11 +30,13 @@ BuildRequires: Xaw3d-devel BuildRequires: man2html-core ImageMagick BuildRequires: desktop-file-utils libappstream-glib -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 <= 3.2.5-7.fc8 -Provides: %{name}-Xaw3d = %{version}-%{release} +# We used to have seperate Xaw3d and non Xaw3d pkgs, now we only have Xaw3d +Obsoletes: %{name}-common < %{version}-%{release} +Provides: %{name}-common = %{version}-%{release} +Obsoletes: %{name}-plain < %{version}-%{release} +Provides: %{name}-plain = %{version}-%{release} +Obsoletes: %{name}-Xaw3d < %{version}-%{release} +Provides: %{name}-Xaw3d = %{version}-%{release} %description Xfig is an X Window System tool for creating basic vector graphics, @@ -53,94 +49,28 @@ You should install xfig if you need a simple program to create vector graphics. -%package plain -Summary: Plain Xaw version of xfig -Group: Applications/Multimedia -Requires: %{name}-common = %{version}-%{release} -Provides: %{name}-executable = %{version}-%{release} - -%description plain -Plain Xaw version of xfig, an X Window System tool for creating basic vector -graphics, including bezier curves, lines, rulers and more. The normal xfig -package uses the more modern / prettier looking Xaw3d toolkit, whereas this -version uses the very basic Xaw toolkit. Unless you really know you want this -version you probably don't want this version. - - -%package common -Summary: Common xfig files -Group: Applications/Multimedia -Requires: transfig >= 1:3.2.5, xdg-utils, enchant, urw-fonts -Requires: hicolor-icon-theme -Requires: xorg-x11-fonts-base -# So that this will get uninstalled together with xfig / xfig-Xaw3d -Requires: %{name}-executable = %{version}-%{release} -Requires(post): desktop-file-utils -Requires(postun): desktop-file-utils - -%description common -Files common to both the plain Xaw and the Xaw3d version of xfig. - - %prep -%setup -q -n xfig.%{version}c -a 1 -a 5 -# These Debian patches are not suited for the Fedora pkg -rm debian/patches/02_Imakefile_Debian.patch -rm debian/patches/05_xfig-libs.patch -rm debian/patches/13_remove_extra_libs.patch -for i in debian/patches/*_*.patch; do - patch -p1 --fuzz=0 < $i -done +%setup -q -a 1 %patch0 -p1 %patch1 -p1 -%patch2 -p1 -b .with-Xaw3d -%patch3 -p1 -%patch4 -p1 - -iconv -f ISO-8859-1 -t UTF8 CHANGES > tmp; touch -r CHANGES tmp; mv tmp CHANGES -for i in CHANGES FIGAPPS LATEX.AND.XFIG README Doc/html/animate.js; do - sed -i.orig 's/\r//' $i; touch -r $i.orig $i +for i in doc/html/japanese/button_frame.fig doc/html/japanese/japanese.ps \ + doc/html/animate.js; do + sed -i.orig 's/\r//' $i; touch -r $i.orig $i; rm $i.orig done -rm Doc/html/images/sav1a0.tmp -rm `find -name "*.orig"` -chmod -x `find -type f` -man2html Doc/xfig.man > Doc/xfig_man.html %build -# First build the normal Xaw version -xmkmf -# make sure cmdline option parsing still works despite us renaming the binary -sed -i 's/"xfig"/"xfig-plain"/' main.c -make CDEBUGFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE -D_DEFAULT_SOURCE -fno-strength-reduce -fno-strict-aliasing" -mv xfig xfig-plain -make distclean - -# And then build the Xaw3d version -mv Imakefile.with-Xaw3d Imakefile -xmkmf -# make sure cmdline option parsing still works despite us renaming the binary -sed -i 's/"xfig-plain"/"xfig-Xaw3d"/' main.c -make CDEBUGFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE -D_DEFAULT_SOURCE -fno-strength-reduce -fno-strict-aliasing" +# Fedora's Xaw3d is built with -DXAW_ARROW_SCROLLBARS +export CFLAGS="-DXAW_ARROW_SCROLLBARS $RPM_OPT_FLAGS -fno-strength-reduce -fno-strict-aliasing" +%configure --enable-xpm-splash +make %{?_smp_mflags} %install -make DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p" install.all -install -p -m 644 CHANGES README LATEX.AND.XFIG FIGAPPS \ - debian/PDFLATEX.AND.XFIG debian/TeXfig2eps $RPM_BUILD_ROOT%{_docdir}/%{name} -ln -s xfig.1x.gz $RPM_BUILD_ROOT%{_mandir}/man1/%{name}-Xaw3d.1x -ln -s xfig.1x.gz $RPM_BUILD_ROOT%{_mandir}/man1/%{name}-plain.1x - -# remove the map generation scripts, these are for xfig developers only -rm $RPM_BUILD_ROOT%{_datadir}/%{name}/Libraries/Maps/{USA,Canada}/assemble -# remove app-defaults symlink which gets installed -rm $RPM_BUILD_ROOT%{_prefix}/lib*/X11/app-defaults - -# install both Xaw and Xaw3d versions and the wrapper for the .desktop file -mv $RPM_BUILD_ROOT%{_bindir}/%{name} $RPM_BUILD_ROOT%{_bindir}/%{name}-Xaw3d -install -p -m 755 %{SOURCE3} $RPM_BUILD_ROOT%{_bindir}/%{name} -install -m 755 %{name}-plain $RPM_BUILD_ROOT%{_bindir} +%make_install INSTALL="install -p" +cp -p README CHANGES FIGAPPS $RPM_BUILD_ROOT%{_docdir}/%{name} +rm -r $RPM_BUILD_ROOT%{_datadir}/pixmaps mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/{16x16,32x32,64x64}/apps convert %{name}16x16.xpm \ $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/16x16/apps/%{name}.png @@ -152,46 +82,45 @@ convert %{name}64x64.xpm \ mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications desktop-file-install --dir $RPM_BUILD_ROOT%{_datadir}/applications %{SOURCE2} mkdir -p $RPM_BUILD_ROOT%{_datadir}/appdata -install -p -m 644 %{SOURCE4} $RPM_BUILD_ROOT%{_datadir}/appdata +install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT%{_datadir}/appdata appstream-util validate-relax --nonet \ $RPM_BUILD_ROOT%{_datadir}/appdata/%{name}.appdata.xml -%post common +%post update-desktop-database &> /dev/null || : touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : -%postun common +%postun update-desktop-database &> /dev/null || : if [ $1 -eq 0 ] ; then touch --no-create %{_datadir}/icons/hicolor &>/dev/null gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : fi -%posttrans common +%posttrans gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %files -%{_bindir}/%{name}-Xaw3d -%{_mandir}/man1/%{name}-Xaw3d.1x.gz - -%files plain -%{_bindir}/%{name}-plain -%{_mandir}/man1/%{name}-plain.1x.gz - -%files common %doc %{_docdir}/%{name} %{_bindir}/%{name} %{_datadir}/%{name} -%{_mandir}/man1/%{name}.1x.gz -%{app_defaults_dir}/* +%{_mandir}/man1/%{name}.1* +%{app_defaults_dir}/Fig %{_datadir}/appdata/%{name}.appdata.xml %{_datadir}/applications/%{name}.desktop %{_datadir}/icons/hicolor/??x??/apps/%{name}.png %changelog +* Thu Aug 11 2016 Hans de Goede - 3.2.6-1 +- New upstream release 3.2.6 +- Drop all patches, all fixes are upstream now +- Drop -plain subpackage, only build Xaw3d version +- Update appdata screenshots for xfig.org being gone + (point to http://epb.lbl.gov/xfig/ for now) + * Sun Feb 28 2016 Hans de Goede - 3.2.5-48.c - Bring in various bugfixes from Debian - Convert icons to png