# # spec file for package a2ps # # Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via https://bugs.opensuse.org/ # Name: a2ps Version: 4.14 Release: 14.3 Summary: Tool to convert ASCII/Latin Text into PostScript License: GPL-3.0-or-later Url: http://www.gnu.org/software/a2ps/a2ps.html Source0: http://ftp.gnu.org/gnu/a2ps/%{name}-%{version}.tar.gz Source1: http://ftp.gnu.org/gnu/a2ps/%{name}-%{version}.tar.gz.sig Source2: %{name}.keyring Source3: a2ps-ko.po Source4: a2ps-open Source5: a2ps-4.14-manuals.diff Patch0: a2ps-4.14.diff Patch1: a2ps-4.13-security.patch Patch2: a2ps-4.14-ogonkify.patch Patch3: a2ps-4.14-tempfile.patch Patch4: a2ps-4.14-automake.patch Patch6: a2ps-4.13-include.patch Patch7: a2ps-4.14-acroread.patch Patch8: a2ps-4.13-base.patch Patch9: a2ps-4.13-utf8.patch Patch10: a2ps-4.13-types.patch Patch11: a2ps-4.13-psgen.patch Patch12: a2ps-4.14-iswprint.patch Patch13: a2ps-4.14-linker.patch # PATCH-FIX-USTREAM Bug 871097 - CVE-2014-0466: a2ps: fixps does not use -dSAFER Patch14: CVE-2014-0466.diff Patch15: a2ps-4.14-gperf.patch # PATCH-FIX-SUSE Bug 955194 - CVE-2015-8107: CVE-2015-8107 - a2ps(gnu) v4.14 format string vulnerability Patch16: a2ps-4.14-bnc955194.patch Patch17: a2ps-buildcompare.patch Patch18: reproducible.patch # PATCH-FIX-SUSE New texinfo 6.7 does not like KOI8-R endcoded characters within UTF-8 environment Patch19: a2ps-4.14-texinfo-6.7.patch BuildRequires: autoconf BuildRequires: automake BuildRequires: bison BuildRequires: emacs-nox BuildRequires: flex BuildRequires: ghostscript-fonts-std BuildRequires: gv BuildRequires: psutils BuildRequires: texlive-latex BuildRequires: timezone Requires: file Requires: ghostscript-fonts-std Requires: glibc Requires: sed Requires: w3m Requires: wdiff Requires(post): %{install_info_prereq} Requires(preun): %{install_info_prereq} Suggests: ImageMagick Suggests: acroread Suggests: gv Suggests: psutils Suggests: texinfo Suggests: texlive-latex Provides: a2ps-bin BuildRoot: %{_tmppath}/%{name}-%{version}-build %if 0%{?suse_version} > 1220 BuildRequires: gperf BuildRequires: groff BuildRequires: makeinfo BuildRequires: texi2html BuildRequires: texinfo %endif %description a2ps converts ASCII text into PostScript. This feature is used by apsfilter, for example, to pretty-print ASCII text. Warning: a2ps is not able to convert complex Unicode (UTF-8) text to PostScript. Only language text which can be converted from UTF-8 to Latin encodings are supported. %package -n liba2ps1 Summary: Library to convert ASCII/Latin text into PostScript %description -n liba2ps1 liba2ps converts ASCII text into PostScript. %package -n a2ps-devel Summary: Library and header file for the interface of a2ps Requires: glibc-devel Requires: liba2ps1 = %{version} %description -n a2ps-devel a2ps converts ASCII text into PostScript. This feature is used by apsfilter, for example, to pretty-print ASCII text. Warning: a2ps is not able to convert complex Unicode (UTF-8) text to PostScript. Only language text which can be converted from UTF-8 to Latin encodings are supported. %prep %setup -q -n a2ps-4.14 touch -r configure.in .ref %patch1 -b .security %patch2 -p1 %patch3 -p1 %patch4 -b .norefresh %patch6 -p1 -b .incld %ifarch %ix86 x86_64 %patch7 -p1 %endif %patch8 -b .base %patch9 -b .utf8 %patch10 -b .types %patch11 -b .psgen %patch12 -b .iswprint %patch13 -p1 %patch14 -p1 %patch15 -p1 %patch16 -p0 %patch17 -p1 %patch0 -b .p0 %patch18 -p1 %patch19 -p0 -b .p19 cp -f %{SOURCE3} po/ko.po find -type f | grep -vE '(parseppd|parsessh).y' | xargs \ sed -ri 's/59 Temple Place(,| -) Suite 330/51 Franklin Street, Fifth Floor/;s/02111-1307/02110-1301/' touch -r .ref configure.in find -name Makefile.in | xargs touch %build #XXX: ugly hack; necessary?? #YYY: Not a hack and it is necessary!! # The a2ps source is much to old to (re)run auto conf tools cp -p %{_datadir}/automake-*/config.{guess,sub} auxdir/ cp -p /bin/true auxdir/missing export AUTOMAKE=/bin/true export ACLOCAL=/bin/true export AUTOCONF=/bin/true export AUTOHEADER=/bin/true export PATH=$PWD:$PATH export CFLAGS="%{optflags} -D_GNU_SOURCE $(getconf LFS_CFLAGS) -funroll-loops -Wall -pipe -fstack-protector -fPIE" export LPR=lpr export CC=gcc export TZ=UTC %configure --enable-shared \ --disable-static \ --with-medium=LC_PAPER \ --with-encoding=LC_CTYPE \ --sysconfdir=%{_sysconfdir}/%{name} con="" pushd contrib for m4 in *.m4; do in=${m4%.*}.in rm -f ${in} ${m4%.*} con="$con ${in##*/}" done popd make -C contrib/ ${con} LDFLAGS="-pie" sh ./config.status # the build system is awful so we need to build with -B and avoid parallelism make PSFONT_PATH=%{_datadir}/fonts/ghostscript LDFLAGS="-pie" MAKEINFO='makeinfo --force' -B pushd doc texi2html a2ps.texi popd # Run a test with UTF-8 Umlauts mkdir -p .root/.a2ps echo "This is a test text äöüßœéïçèãøæđ" > test.utf8 ln -sf $PWD/ps/* .root/.a2ps/ ln -sf $PWD/afm/* .root/.a2ps/ ln -sf $PWD/encoding/* .root/.a2ps/ ln -sf $PWD/ogonkify/* .root/.a2ps/ ln -sf $PWD/ppd/* .root/.a2ps/ ln -sf $PWD/sheets/* .root/.a2ps/ A2PS_CONFIG=$PWD%{_sysconfdir}/a2ps.cfg \ HOME=$PWD/.root \ LC_CTYPE=en_US.UTF-8 ./src/a2ps --output=test.latin test.utf8 grep '(This is a test text' test.latin | iconv -f latin1 -t utf8 chmod u+rw,g+r,o+r man/*.1 cp -p man/a2ps.1 man/a2ps.1.backup patch --reject-format=unified --quoting-style=literal -f -p0 -F0 < %{S:5} || : if test -e man/a2ps.1.rej ; then cat man/a2ps.1.rej exit 1 else sed -ri '/^\.B lt-a2ps/{s/lt-(a2ps)/\1/}' man/a2ps.1 || : fi %install %make_install PSFONT_PATH=%{_datadir}/fonts/ghostscript rm -r %{buildroot}/%{_infodir}/regex* %find_lang %{name} rm -f %{buildroot}%{_libdir}/liba2ps.la install -m 0755 %{SOURCE4} %{buildroot}/%{_bindir}/ mv %{buildroot}%{_sysconfdir}/%{name}/a2ps-site.cfg %{buildroot}%{_sysconfdir}/%{name}/a2ps-site.cfg-new mv %{buildroot}%{_sysconfdir}/%{name}/a2ps.cfg %{buildroot}%{_sysconfdir}/%{name}/a2ps.cfg-new %post %install_info --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz %install_info --info-dir=%{_infodir} %{_infodir}/ogonkify.info.gz %preun %install_info_delete --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz %install_info_delete --info-dir=%{_infodir} %{_infodir}/ogonkify.info.gz %post -n liba2ps1 -p /sbin/ldconfig %postun -n liba2ps1 -p /sbin/ldconfig %files -f %{name}.lang %doc AUTHORS COPYING ABOUT-NLS ChangeLog NEWS THANKS README doc/a2ps.html %config %{_sysconfdir}/%{name}/a2ps-site.cfg-new %config %{_sysconfdir}/%{name}/a2ps.cfg-new %{_bindir}/a2ps %{_bindir}/a2ps-open %{_bindir}/card %{_bindir}/composeglyphs %{_bindir}/fixnt %{_bindir}/fixps %{_bindir}/ogonkify %{_bindir}/pdiff %{_bindir}/psmandup %{_bindir}/psset %{_bindir}/texi2dvi4a2ps %{_infodir}/*.gz %{_mandir}/man1/*.1.gz %{_datadir}/a2ps #%{_datadir}/emacs/site-lisp/*.el #%{_datadir}/emacs/site-lisp/*.elc %{_datadir}/ogonkify %files -n liba2ps1 %{_libdir}/liba2ps.so.* %files -n a2ps-devel %{_includedir}/liba2ps.h %{_libdir}/liba2ps.so %changelog * Wed May 13 2020 Guillaume GARDET - Discard rm of nonexistent %%{_infodir}/dir to fix build * Thu Nov 7 2019 Dr. Werner Fink - Add patch a2ps-4.14-texinfo-6.7.patch to let it build with texinfo-6.7 as well * Thu Oct 17 2019 Richard Brown - Remove obsolete Groups tag (fate#326485) * Sun Mar 17 2019 Jan Engelhardt - Implement shared library packaging policy. - Remove --with-pic which is useless with --disable-static. - Use noun phrase in summary. - Resolve PreReq FIXMEs. * Tue Oct 16 2018 werner@suse.de - Make LFS support work on 32bit architectures (bsc#1112014) * Mon Jul 16 2018 bwiedemann@suse.com - Add reproducible.patch to fix build date (boo#1047218) - Run build non-parallelized and with make -B because of poorly specified make build dependencies to make build reproducible * Thu Jun 29 2017 werner@suse.de - Be more flexible in patching man/a2ps.1 * Mon May 29 2017 werner@suse.de - Split off patch a2ps-4.14-manuals.diff as otherwise we might not patch the final manual page - Avoid broken macro in manual page templates * Thu Mar 3 2016 olaf@aepfle.de - Reduce build-compare noise, no timestamps a2ps-buildcompare.patch * Mon Nov 16 2015 werner@suse.de - Add patch a2ps-4.14-bnc955194.patch to fix format string vulnerability (bnc#955194) * Sun May 24 2015 mpluskal@suse.com - Add gpg signature - Update info scriplet dependencies - Add a2ps-4.14-gperf.patch (boo#932138) - Cleanup spec file with spec-cleaner * Wed Mar 4 2015 werner@suse.de - Add a test case to be able to detect any broken backport * Tue Mar 3 2015 werner@suse.de - Avoid zero length FAQ * Tue Mar 3 2015 werner@suse.de - Avoid automake-1.9 as there is no automake-1.9 anymore therefore add patch a2ps-4.14-automake.patch - Avoid useless warning and add patch a2ps-4.14-iswprint.patch * Mon Mar 2 2015 werner@suse.de - Fix ported patch a2ps-4.14.diff to avoid bug in locale handling as well in font format definition (boo#919249, boo#919243) * Fri Feb 6 2015 werner@suse.de - BuildRequire texi2html * Mon Feb 2 2015 werner@suse.de - Correct patch a2ps-4.14.diff (boo#915483) - Make a2ps-open smart now * Tue Dec 23 2014 meissner@suse.com - build with PIE * Mon Nov 10 2014 sfalken@opensuse.org - Removed pkgconfig entries from Requires: section, per OBS request 243897 * Thu Oct 2 2014 crrodriguez@opensuse.org - Do not buildrequire xorg-x11-devel, never used. * Wed Sep 17 2014 sfalken@opensuse.org - Fixed license in .spec file to reflect upstream changing to GPLv3 (sr#248177) * Wed Aug 20 2014 sfalken@opensuse.org - Updated to 4.14 * No UTF-8 Support yet, Basically a maintenance release. * GNU a2ps is now licensed under GPLv3 or later * Can now be built with Modern GNU Autotools, and gcc>=3.4 * Numerous minor bugfixes, including: * input buffer overflow * IA64, PPC, and AMD64 fixes * Several security issues (CVE-2004-1377) * Addition of a number of new stylesheets * Translations for Japanese, Dutch, and French added/updated - Patches rebased for 4.14 sources * Added: a2ps-4.14-acroread.patch a2ps-4.14-linker.patch a2ps-4.14-ogonkify.patch a2ps-4.14-tempfile.patch a2ps-4.14.diff * Deleted: a2ps-4.13-acroread.patch a2ps-4.13-linker.patch a2ps-4.13-ogonkify.patch a2ps-4.13-tempfile.patch a2ps-4.13.dif a2ps-4.13-gv-arguments.patch a2ps-4.13-nb.patch a2ps-4.13-space.patch * Modified: CVE-2014-0466.diff - Deleted a2ps-4.13.tar.gz, replaced with a2ps-4.14.tar.gz - a2ps.spec cleanup, and updating to work with new sources. * Wed Jun 25 2014 werner@suse.de - Remove obsolete tarball * Mon Mar 31 2014 werner@suse.de - Add patch CVE-2014-0466.diff to fix bnc#871097 - CVE-2014-0466: fixps does not use -dSAFER * Mon Dec 9 2013 werner@suse.de - Work around new linker behaviour that is enforce the liba2ps to depend on libm * Mon Mar 18 2013 mmeister@suse.com - Added download link to Source section in spec * Mon Jul 30 2012 coolo@suse.com - add texinfo and makeinfo as buildrequires to fix build * Sat Jun 16 2012 jengelh@inai.de - Use a more future-proof source path for copying in config.* * Tue May 29 2012 puzel@suse.com - fix build with automake-1.12 * Tue Feb 21 2012 werner@suse.de - Fix shared library build on all 64bit architectures (hint from Dinar Valeev) * Tue Feb 7 2012 meissner@suse.de - copy config.* files instead of old suse_update_config macro. * Thu Nov 3 2011 werner@suse.de - Fix wrong parameter usage for gv in a2ps.conf (bnc#725806) * Sat Sep 17 2011 jengelh@medozas.de - Remove redundant tags/sections from specfile - Use %%_smp_mflags for parallel build * Tue Jan 18 2011 werner@novell.com - Remove tests/gps-ref/Converter.ps and tests/ps-ref/Converter.ps since they are non-free (bnc#665104) * Tue Aug 17 2010 werner@suse.de - Suggest a few useful packages (bnc#631293) - Add a2ps-open as wrapper for printer `display' * Fri Aug 28 2009 werner@suse.de - Use return value from fopen (bnc#533398) * Fri Jan 16 2009 crrodriguez@suse.de - use --enable-shared and disable static libraries * Mon Oct 27 2008 werner@suse.de - Make liba2ps.h includable without any further includes also split off a devel package as suggested by Thorsten (bnc#438889) * Tue Jul 15 2008 werner@suse.de - Better workaround for UTF-8 files * Tue Mar 4 2008 werner@suse.de - Work around reencoded fonts from ogonkify in wdiff screen mode * Fri Apr 20 2007 aj@suse.de - Use texlive for building. * Fri Mar 30 2007 ssommer@suse.de - add flex to BuildRequires * Mon Feb 19 2007 werner@suse.de - Removed the test file Convert.java and its resulting ps files from source tar ball due license problems. * Thu Feb 8 2007 ro@suse.de - added defattr * Fri May 19 2006 werner@suse.de - Fix reencode_font macro in base.ps (bug #176360) * Thu Apr 27 2006 cthiel@suse.de - removed acroread from BuildRequires - added patch to fake acoread on ix86 and x86_64 * Thu Feb 23 2006 werner@suse.de - Use w3m to get ascii from html and the use a2ps its self to get PostScript out of ASCII. (bug #152470) * Wed Jan 25 2006 mls@suse.de - converted neededforbuild to BuildRequires * Sat Jan 14 2006 schwab@suse.de - Don't strip binaries. * Thu Jan 12 2006 werner@suse.de - Use the gcc stack protector * Fri Dec 2 2005 werner@suse.de - Fix handling of long options without arguments in a2ps script * Tue Sep 20 2005 yxu@suse.de - Add prototypes for functions * Fri Jun 17 2005 werner@suse.de - The pdiff requires wdiff (bug #91335) * Fri May 13 2005 werner@suse.de - Allow spaces in file names * Fri May 13 2005 werner@suse.de - Add a wrapper script for converting UTF-8 text _partly_ into the natural latin encoding of the given language enviroment (#43348) * Sat Apr 2 2005 coolo@suse.de - remove conflicting prototype * Mon Oct 25 2004 ro@suse.de - locale rename: no -> nb * Wed Aug 25 2004 werner@suse.de - Escapes file names so that the shell groks it in single quotes * Thu Mar 18 2004 werner@suse.de - More temporary file security issues (bug #36368) * Wed Aug 6 2003 werner@suse.de - Partly workaround for ASCII and UTF-8 (mapp them to ISO 8859-15, bug #28348) * Mon Jul 28 2003 werner@suse.de - Fix keyword Lette(r) (bug #27411) * Wed Jun 11 2003 kukuk@suse.de - Use %%find_lang macro - Fix filelist - Fix neededforbuild for emacs * Thu Apr 24 2003 ro@suse.de - fix install_info --delete call and move from preun to postun * Tue Feb 11 2003 kukuk@suse.de - Add install-info macros [Bug #23390] * Mon Nov 11 2002 ro@suse.de - changed neededforbuild to * Tue Sep 17 2002 ro@suse.de - removed bogus self-provides * Sun Jul 28 2002 kukuk@suse.de - remove bzip from neededforbuild * Thu Jul 4 2002 werner@suse.de - Add README's and a2ps.html to package doc dir (bug # 16229) * Thu May 23 2002 ro@suse.de - use libdir * Mon Feb 25 2002 pblahos@suse.cz - filtering mozilla output in iso-8859-2 removed, mozilla does it correctly now, only stripping Title. * Wed Jan 23 2002 okir@suse.de - Fixed tempfile problem in fixnt * Fri Dec 7 2001 werner@suse.de - Enable automagic LC_PAPER and LC_CTYPE detection within a2ps-site.cfg * Fri Aug 31 2001 pblahos@suse.cz - implemented filtering of mozilla output in iso-8859-2 * Fri Jul 20 2001 kukuk@suse.de - changed neededforbuild to * Mon May 7 2001 mfabian@suse.de - bzip2 sources * Thu Apr 26 2001 werner@suse.de - We've to use dots within floats (#7284) - Fix manual page (#7192) * Tue Apr 24 2001 werner@suse.de - Add Euro symbol to afm of ogonkify fonts - Implement code to be able to use LC_PAPER and LC_CTYPE for paper size and default encoding. * Thu Apr 19 2001 werner@suse.de - Use newest ogonkify to get eurifyFont working - Include dummy metric for Euro sign to get it work with ghostscript and real PostScript printers (ogonkify -e L9 -E) * Wed Mar 14 2001 ro@suse.de - use emacs-x11 for now * Tue Mar 13 2001 ro@suse.de - added emacs-nox to neededforbuild * Fri Jan 26 2001 violiet@suse.de - remove Korean filter file = a2ps-h * Tue Jan 23 2001 violiet@suse.de - added Korean filter file = a2ps-h - improvement Korean message file. * Mon Jan 15 2001 werner@suse.de - Fix the temporary file patch. * Wed Jan 10 2001 werner@suse.de - Add temporary file patch * Fri Nov 17 2000 werner@suse.de - Update to version 4.13(b) - Include some package to use automatic configuration for - Set PSFONT_PATH to /usr/share/ghostscript/fonts * Fri Nov 17 2000 ro@suse.de - ge_exec -> emacs * Thu Jul 6 2000 ro@suse.de - merged patches * Thu Jul 6 2000 werner@suse.de - Add `,' to atan2 in for77kwds.ssh to distinguish atan2 from cabs. * Fri Apr 7 2000 bk@suse.de - added suse update config macro * Fri Feb 25 2000 kukuk@suse.de - Fill out copyright and group tag - Move /usr/{info,man} -> /usr/share/{info,man} * Thu Jan 13 2000 werner@suse.de - Fix a2ps path in a2ps.el - Add all page names and their sizes known by ghostscript * Thu Dec 16 1999 werner@suse.de - Fix Bug (NULL pointer if --title="" is used) - Remove Makefile.Linux * Mon Sep 13 1999 bs@suse.de - ran old prepare_spec on spec file to switch to new prepare_spec. * Mon Jul 19 1999 florian@suse.de - update to a2ps 4.12 * Wed Oct 29 1997 florian@suse.de - add missing patch detectet by Werner Fink Added the changes from Andreas Klemm for apsfilter into /usr/bin/a2ps. aps could use standard /usr/bin/a2ps now.