groff/groff.spec

492 lines
19 KiB
RPMSpec
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#
# spec file for package groff (Version 1.18.1.1)
#
# Copyright (c) 2009 SUSE LINUX Products 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 http://bugs.opensuse.org/
#
# norootforbuild
Name: groff
BuildRequires: bison fdupes gcc-c++
%define build_groff_docu 1
#
License: BSD 3-Clause; GPL v2 or later
Group: Productivity/Publishing/Troff
Provides: normal-groff, jgroff
Obsoletes: jgroff
PreReq: %fillup_prereq %install_info_prereq
AutoReqProv: on
Version: 1.18.1.1
Release: 168
Summary: GNU troff Document Formatting System
Url: http://www.gnu.org/software/groff/groff.html
# cvs -z3 -d:pserver:anonymous@cvs.savannah.gnu.org:/sources/groff co groff
Source0: ftp://ftp.gnu.org/gnu/groff/groff-1.18.1.1.tar.bz2
Source1: SuSEconfig.groff
Source2: sysconfig.suseconfig-groff
Source3: zzz-groff.sh
Source4: zzz-groff.csh
Patch0: groff_1.18.1.1-1-debian.diff.bz2
Patch1: suse.patch
Patch2: pic-html.patch
Patch3: gcc4.patch
Patch4: groff-1.17.2-gcc3.patch
Patch5: utf8.patch
Patch6: debian-fix.patch
Patch7: double-free.patch
Patch8: groffer-security.patch
Patch9: groff-1.18.1.1-gcc41.patch
Patch10: bugzilla-217106-too-few-arguments-in-function-call.patch
Patch11: bugzilla-292412-special-encoding-handling-also-for-chinese.patch
Patch12: gcc43.patch
Patch13: fgets-overflow.patch
Patch14: groff-1.18.1.1-destbufferoverflow.patch
Patch446710: bnc446710.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
The groff package provides compatible versions of troff, nroff, eqn,
tbl, and other Unix text formatting utilities.
Groff is used to "compile" man pages stored in groff or nroff format
for different output devices, for example, displaying to a screen or in
PostScript(tm) format for printing on a PostScript(tm) printer. Most
programs store their man pages in either /usr/share/man/ or
/usr/X11R6/man/.
Authors:
--------
James Clark <jjc@clark.com>
%prep
%setup -q -n groff-%{version}
%patch0 -p1 -b .debian
%patch1 -p1 -b .suse
%patch2 -p1 -b .pic-html
%patch3 -p1 -b .gcc4
%patch4 -p1 -b .gcc3
%patch5 -p1 -b .utf-8
%patch6 -p1 -b .debian-fix
%patch7
%patch8 -p1
%patch9 -p1
%patch10 -p1
%patch11 -p1
%patch12 -p0
%patch13 -p0
%patch14
%patch446710 -p1
%build
# remove empty backups
rm -f ChangeLog.jp.debian README.jp.debian
#
PATH=$PWD/src/roff/troff:$PWD/src/preproc/pic:$PWD/src/preproc/eqn:$PWD/src/preproc/tbl:$PWDsrc/preproc/refer:$PWD/src/preproc/soelim:$PATH
PATH=$PWD/src/roff/grog:$PWD/src/roff/groff:$PWD/src/devices/grops:$PWD/src/devices/grotty:$PWD/src/devices/grodvi:$PWD/src/devices/grohtml:$PATH
GROFF_COMMAND_PREFIX=
GROFF_FONT_PATH=$PWD
GROFF_TMAC_PATH=$PWD/tmac:$PWD/src/roff/troff
export PATH GROFF_COMMAND_PREFIX GROFF_FONT_PATH GROFF_TMAC_PATH
#
#libtoolize --force
#autoreconf --force --install
export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" CXXFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" INSTALL_PROGRAM='${INSTALL}'
./configure --prefix=/usr --mandir=%{_mandir} --infodir=%{_infodir} --enable-multibyte
make
%if %{build_groff_docu}
pushd doc
#echo "papersize a4" > /etc/papersize
make
makeinfo groff.texinfo
popd
%endif
%install
if [ ! "x" = "x$RPM_BUILD_ROOT" ] ; then
install -d -m755 $RPM_BUILD_ROOT
fi
mkdir -p $RPM_BUILD_ROOT/usr/share
mkdir -p $RPM_BUILD_ROOT/etc
mkdir -p $RPM_BUILD_ROOT%{_defaultdocdir}/groff
make install manroot=$RPM_BUILD_ROOT%{_mandir} prefix=$RPM_BUILD_ROOT/usr docdir=$RPM_BUILD_ROOT%{_defaultdocdir}/groff infodir=$RPM_BUILD_ROOT/usr/share/info
%if %{build_groff_docu}
install -c -m0444 doc/*.ps $RPM_BUILD_ROOT%{_defaultdocdir}/groff
#install -c -m0444 doc/*.html $RPM_BUILD_ROOT%{_defaultdocdir}/groff
install -c -m0444 doc/*.png $RPM_BUILD_ROOT%{_defaultdocdir}/groff
install -c -m0444 BUG* COPYING ChangeLog* INSTALL* MORE* NEWS PROBLEMS PROJECTS README* REVISION TODO VERSION $RPM_BUILD_ROOT%{_defaultdocdir}/groff
%endif
mkdir -p $RPM_BUILD_ROOT%{_infodir}
install -c -m 444 doc/groff doc/groff-[0-9]* $RPM_BUILD_ROOT%{_infodir}
ln -sf eqn $RPM_BUILD_ROOT/usr/bin/geqn
ln -sf tbl $RPM_BUILD_ROOT/usr/bin/gtbl
mkdir -p $RPM_BUILD_ROOT/sbin/conf.d
mkdir -p $RPM_BUILD_ROOT/var/adm/fillup-templates
install -c -m0755 $RPM_SOURCE_DIR/SuSEconfig.groff $RPM_BUILD_ROOT/sbin/conf.d/
install -c -m0644 $RPM_SOURCE_DIR/sysconfig.suseconfig-groff $RPM_BUILD_ROOT/var/adm/fillup-templates/
echo "papersize a4" > $RPM_BUILD_ROOT/etc/papersize
chmod 0644 $RPM_BUILD_ROOT/etc/papersize
# install profiles to disable the use of ANSI colour sequences by default:
mkdir -p $RPM_BUILD_ROOT/etc/profile.d
install -m 644 $RPM_SOURCE_DIR/zzz-groff.sh $RPM_BUILD_ROOT/etc/profile.d
install -m 644 $RPM_SOURCE_DIR/zzz-groff.csh $RPM_BUILD_ROOT/etc/profile.d
pushd $RPM_BUILD_ROOT/usr/share/groff
test -d 1.18.1 || exit 1
ln -s 1.18.1 current
popd
%fdupes $RPM_BUILD_ROOT
%clean
#[ "$RPM_BUILD_ROOT" != "/" ] && [ -d $RPM_BUILD_ROOT ] && rm -rf $RPM_BUILD_ROOT;
%post
%{fillup_only -an suseconfig}
%install_info --info-dir=%{_infodir} %{_infodir}/groff.gz
%postun
%install_info_delete --info-dir=%{_infodir} %{_infodir}/groff.gz
%files
%defattr(-, root, root)
%dir %{_defaultdocdir}/groff
%doc %{_defaultdocdir}/groff/*
%doc %{_infodir}/groff*
/usr/bin/*
%doc %{_mandir}/man?/*
%config(noreplace) %verify(not md5 size mtime) /etc/papersize
%config /etc/profile.d/zzz-groff.*sh
%dir /usr/share/groff/
%dir /usr/share/groff/site-tmac/
/usr/share/groff/site-tmac/*
/usr/share/groff/current
%dir /usr/share/groff/1.18.1/
/usr/share/groff/1.18.1/eign
%dir /usr/share/groff/1.18.1/font/
/usr/share/groff/1.18.1/font/*
%dir /usr/share/groff/1.18.1/tmac/
/usr/share/groff/1.18.1/tmac/*.tmac
/usr/share/groff/1.18.1/tmac/*rc*
/usr/share/groff/1.18.1/tmac/hyphen.us
%dir /usr/share/groff/1.18.1/tmac/mdoc/
/usr/share/groff/1.18.1/tmac/mdoc/*
%dir /usr/share/groff/1.18.1/tmac/mm/
/usr/share/groff/1.18.1/tmac/mm/*cov
/usr/share/groff/1.18.1/tmac/mm/*MT
%verify(not md5) /usr/share/groff/1.18.1/tmac/mm/locale
%verify(not md5) /usr/share/groff/1.18.1/tmac/mm/se_locale
/sbin/conf.d/SuSEconfig.groff
/var/adm/fillup-templates/sysconfig.suseconfig-groff
%changelog
* Mon Dec 22 2008 mls@suse.de
- keep zzz-groff.csh from aborting if LANG is unset
* Tue Nov 25 2008 mfabian@suse.de
- bnc#448185: improve workaround for bnc#446710. After the
tmandocdb workaround was removed from "man", the new
workaround in groff failed in some locales.
* Fri Nov 21 2008 mfabian@suse.de
- bnc#401952: Add a workaround to /usr/bin/nroff to make Korean
man-pages display correctly again.
- /etc/profile.d/groff.{sh,csh} moved to
/etc/profile.d/zzz-groff.{sh,csh} to be able to check for LANG.
Changes in these scripts:
Dont set GROFF_NO_SGR by default anymore, it causes problems
with Korean man pages.
For CJK languages, set MAN_KEEP_FORMATTING by default.
Without MAN_KEEP_FORMATTING man will use GROFF_NO_SGR when
writing to a pipe or file and will also pipe the result
through "col -b -p -x". This doesnt work well for CJK, at
least not with the current version of groff.
* Thu Nov 20 2008 mfabian@suse.de
- bnc#446710: add the workarounds from
/usr/share/groff/site-tmac/tmac.andocdb (man package) directly
to groff. These workarounds are to avoid rendering - as
U+2010 (HYPHEN), \- as U+2212 (MINUS SIGN), ` as U+2018
(LEFT SINGLE QUOTATION MARK), and ' as U+2019 (RIGHT SINGLE
QUOTATION MARK). Using these non-ASCII characters for rendering
man-pages with programm examples and command line options is
confusing and prevents cut and paste of code examples
impossible.
* Wed Oct 08 2008 crrodriguez@suse.de
- fix buffer overflow in ps.cc
* Mon Oct 06 2008 meissner@suse.de
- fixed fgets overflow
- fixed some rpmlint issues
* Mon Apr 21 2008 mfabian@suse.de
- bnc#381905: remove the hack in /usr/bin/nroff to convert
UTF-8 encoded man-pages back to the appropriate legacy encoding
because newer versions of “man” also do this conversion now
and doing the same conversion twice breaks it.
* Tue Mar 25 2008 mfabian@suse.de
- bnc#373284: fix wrong spelling of UTF-8 in iconv call used in
nroff.sh (Thanks to Bruno Haible <bruno@clisp.org> for the fix).
* Wed Nov 07 2007 meissner@suse.de
- fixed gcc4.3 build
* Tue Jul 24 2007 mfabian@suse.de
- Bugzilla #292412: make the hacks for Chinese less weird by
applying the patch from comment #31 by Peng Wu <pwu@novell.com>
and adapting the patch to /usr/bin/nroff.
- remove shebang from SuSEconfig.groff (is sourced, not executed).
* Mon Jul 23 2007 mfabian@suse.de
- Bugzilla #292412: add some more hacks to /usr/bin/nroff to
support Chinese man pages as well.
* Mon Mar 26 2007 rguenther@suse.de
- add bison BuildRequires.
* Wed Jan 17 2007 mfabian@suse.de
- Bugzilla #217106: too few arguments in function call.
* Tue Jan 09 2007 mfabian@suse.de
- do not build as root.
- make it build in the openSUSE build service.
* Tue Jan 02 2007 mfabian@suse.de
- Bugzilla #230030: make Russian and Czech man-pages display
correctly again in UTF-8 locales (has been broken by the
update to man-2.4.3).
* Tue Sep 05 2006 rguenther@suse.de
- Split gxdview to a separate spec file.
* Mon Sep 04 2006 rguenther@suse.de
- Remove unneeded build dependency on ghostscript-mini.
* Sun Aug 06 2006 cthiel@suse.de
- fix build with X.org 7.1
* Tue Feb 28 2006 mfabian@suse.de
- Bugzilla #148472: use -Tlatin1 instead of -Tascii8 for
languages which used ISO-8859-1 as legacy encoding.
With -Tascii8, "\(:u" for <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>t work.
* Thu Feb 09 2006 mfabian@suse.de
- Bugzilla #148922: nroff hangs when input comes from a file
and not from a pipe: Improfe UTF-8 workaround to handle this
case as well by parsing the options with getopt to find out
whether a file was given as an argument.
* Fri Jan 27 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Thu Jan 26 2006 sbrabec@suse.cz
- Added %%install_info_prereq.
* Mon Jan 23 2006 mfabian@suse.de
- Bugzilla #144726: add workaround to allow UTF-8 encoded sources
of man-pages. Some packages already contain man-pages with
UTF-8 encoded man-page sources, for example "mc". Hopefully
one day groff will really support this. Until then a workaround
is better than nothing.
* Fri Dec 09 2005 meissner@suse.de
- -fno-strict-aliasing.
* Thu Oct 13 2005 meissner@suse.de
- fixed build.
* Sat Sep 17 2005 meissner@suse.de
- fixed implicits.
* Mon Aug 22 2005 mfabian@suse.de
- Bugzilla #105807: /etc/papersize can be changed by SuSEconfig,
don't verify md5, size, mtime.
/usr/share/groff/1.18.1/tmac/mm/locale and
/usr/share/groff/1.18.1/tmac/mm/se_locale are empty by default,
don't verify md5.
* Wed Jun 22 2005 mfabian@suse.de
- improve papersize detection in SuSEconfig.groff.
* Thu Jun 02 2005 mfabian@suse.de
- add symbolic link for tetex (and others):
/usr/share/groff/%%{version} -> /usr/share/groff/current
* Mon Dec 06 2004 mfabian@suse.de
- Bugzilla #47862: fix insecure creation of temporary directory
in groffer.sh, see also CAN-2004-0969.
* Fri Sep 17 2004 mfabian@suse.de
- add gcc4 patch received from Andreas Jaeger.
* Thu Sep 16 2004 schwab@suse.de
- Fix double free.
* Tue Sep 07 2004 mfabian@suse.de
- Bugzilla #44115: add groff.{sh,csh} and set GROFF_NO_SGR to
disable the use of ANSI colour sequences by default. They don't
work well with many pagers (e.g. lv, (X)Emacs) and they cause
problems when searching in man-pages when using less as the
pager.
* Tue Jun 29 2004 mfabian@suse.de
- update to 1.18.1.1
- remove bison patch, voiddecl patch and patch to node.cc
(fixed upstream).
* Mon Apr 19 2004 mmj@suse.de
- Declare void functions as such, and make int functions return such
* Tue Aug 26 2003 mfabian@suse.de
- Bugzilla #28394: add workaround to display the euro symbol in
'man iso-8859-15' correctly in UTF-8 locales.
* Thu Aug 14 2003 mfabian@suse.de
- Bugzilla #28945: add missing activation metadata to
sysconfig template
* Wed May 21 2003 coolo@suse.de
- making /etc/papersize noreplace (the chances are very small the
package knows the papersize better than the user)
- installing the info pages
* Thu Mar 06 2003 ro@suse.de
- readd ghostscript-mini to neededforbuild (fix docu)
* Thu Mar 06 2003 mfabian@suse.de
- Bug #24758: fix segfault on copying an empty bracket_node
was reproducible with echo ' \b"" ' | troff
* Mon Jan 27 2003 mfabian@suse.de
- Bug #22693: add missing metadata to sysconfig.suseconfig-groff
* Mon Jan 20 2003 mfabian@suse.de
- fix file list to include /usr/share/man{5,7}/*
- extend workaround for non-latin1 man-page sources in UTF-8
locales to Hungarian, Croatian, Polish, and Russian
* Fri Dec 06 2002 olh@suse.de
- remove ghostscript-mini-packages to build groff anyway
* Wed Nov 20 2002 ro@suse.de
- use ghostscript-mini-packages
* Wed Nov 13 2002 ro@suse.de
- fix build with current bison (end all rules with ";")
* Sun Oct 13 2002 mfabian@suse.de
- remove bogus "Requires: bc".
* Wed Aug 28 2002 mfabian@suse.de
- fix display of Czech man pages in cs_CZ.UTF-8 locale
* Thu Aug 01 2002 mfabian@suse.de
- add %%fillup_prereq to Prereq:
* Tue Jun 04 2002 mfabian@suse.de
- fix typo
* Tue Jun 04 2002 mfabian@suse.de
- fix display of Japanese man pages in ja_JP.UTF-8 locale
* Thu May 02 2002 meissner@suse.de
- Fixed g++ 3 issue (do not link C++ libraries with gcc)
* Sun Apr 07 2002 schwab@suse.de
- Fix for new autoconf.
* Tue Mar 19 2002 mfabian@suse.de
- fix bug #15052: add 'libgimpprint glib glib-devel' to
'# neededforbuild' because 'gs' needs this to run. When 'gs'
doesn't run, some .png pictures in the 'doc' directory
can't be created and remain empty.
- add groff-1.17.2-pic-html.diff to avoid using the process ID
in the names of the created .png files.
* Sun Mar 10 2002 mfabian@suse.de
- write just 'a4' or 'letter' into /etc/papersize, not
'papersize a4' or 'papersize letter'. All this papersize
stuff doesn't seem to matter much anyway as groff calls
grops with the '-g' option (guess page length).
* Sat Mar 09 2002 ro@suse.de
- replaced plp by lprng in neededforbuild
* Fri Mar 01 2002 mfabian@suse.de
- fix /sbin/conf.d/SuSEconfig.groff:
prefer paper size information from the locale, use GROFF_PAGESIZE
as an override.
* Fri Feb 01 2002 ro@suse.de
- changed neededforbuild <libpng> to <libpng-devel-packages>
* Wed Jan 16 2002 ro@suse.de
- moved variables to sysconfig/suseconfig
* Thu Jan 10 2002 mfabian@suse.de
- move *GROFF* variables from /etc/rc.config to
/etc/sysconfig/groff (fix Bug #12739)
* Mon Oct 15 2001 mfabian@suse.de
- add /etc/papersize (fix Bug #11810)
* Mon Sep 03 2001 mfabian@suse.de
- add obsoletes jgroff
* Thu Aug 30 2001 mfabian@suse.de
- upgrade debian patch to groff_1.17.2-7.diff
(fixes the problem with bold utf-8 characters, i.e. obsoletes
groff_1.17.2-6.1-debian-fix-minus.diff and includes a fix
for the troff man-page)
* Tue Aug 21 2001 mfabian@suse.de
- upgrade debian patch to groff_1.17.2-6.1.diff
(fix hyphen character problem in EUC-JP encoding,
Fumitoshi UKAI <ukai@debian.or.jp> Fri, 17 Aug 2001)
- fix problem with bold minus characters in utf-8 caused by
debian patch (thanks to <mls@suse.de>)
* Fri Aug 17 2001 mfabian@suse.de
- include patch for Japanese support from Debian
- security fix from Sebastian Krahmer <krahmer@suse.de> seems
to be included upstream, removed.
* Fri Jul 20 2001 kukuk@suse.de
- changed neededforbuild <gs_fonts> to <ghostscript-fonts-std>
- changed neededforbuild <gs_lib> to <ghostscript-library>
- changed neededforbuild <gs_serv> to <ghostscript-serv>
* Thu Jul 12 2001 fehr@suse.de
- update to version 1.17.2
* Fri Jul 06 2001 fehr@suse.de
- add security fix from Sebastian Krahmer <krahmer@suse.de>
* Mon Jun 25 2001 fehr@suse.de
- update to version 1.17.1
* Tue Jun 12 2001 fehr@suse.de
- make it build with newer compilers (ia64, axp)
* Tue May 22 2001 fehr@suse.de
- update to version 1.17
* Mon May 07 2001 mfabian@suse.de
- bzip2 source
* Sat Apr 21 2001 schwab@suse.de
- Fix C++ constraint violation.
* Wed Mar 07 2001 uli@suse.de
- added xf86 to neededforbuild
* Wed Dec 13 2000 mfabian@suse.de
- added "Provides: normal-groff". This enables the japanized
groff to use "Provides: groff" and "Conflicts: normal-groff".
* Fri Dec 08 2000 fehr@suse.de
- add conflicts to jgroff
* Tue Sep 05 2000 fehr@suse.de
- check for writable fontdir in SuSEconfig.groff (#2787)
* Tue Aug 15 2000 mfabian@suse.de
- update to version 1.16.1
- added 'BuildRoot'
* Fri Aug 04 2000 fehr@suse.de
- changes to new version 1.16.1 of groff
* Fri Jul 21 2000 fehr@suse.de
- add patch to display japanese man pages again
* Fri Jul 07 2000 fehr@suse.de
- change comment in rc.config part of package (bugzilla #3256)
* Mon May 29 2000 fehr@suse.de
- changes to new version 1.16 of groff
* Fri May 19 2000 fehr@suse.de
- move documentation to /usr/share/doc/packages
* Thu Mar 16 2000 werner@suse.de
- nroff script
* Allow other ISO latin character sets because they use the same
8 bit table: use -Tlatin1
* Allow wide ANSI character maps (e.g. Japanese) because they use
multiple 8 bit characters: use -Tlatin1
* Map -Tnippon to -Tlatin1
* Mon Mar 06 2000 schwab@suse.de
- Update tmac.m from CVS.
- Fix tmac.mse reference to tmac.m.
* Fri Feb 25 2000 schwab@suse.de
- /usr/man -> /usr/share/man
* Mon Jan 03 2000 schwab@suse.de
- Update to 1.15 (Y2K fix).
- Get rid of Makefile.Linux.
* Mon Sep 27 1999 bs@suse.de
- fixed requirements for sub packages
* Mon Sep 13 1999 bs@suse.de
- ran old prepare_spec on spec file to switch to new prepare_spec.
* Fri Jul 02 1999 werner@suse.de
- Fix Makefle.Linux to make (g)xditview with the values
set in Imakefile
- Split up a new package gxdview to avoid dependencies
of groff on the X11 system.
- Correct version number of groff in pac
* Tue Feb 23 1999 ro@suse.de
- don't redclare strchr for glibc
* Tue Dec 15 1998 bs@suse.de
- fixed SuSEconfig
* Sun Dec 13 1998 bs@suse.de
- made SuSEconfig.groff a little bit more silent.
* Wed Nov 18 1998 ro@suse.de
- commented out "find" in specfile
* Tue Nov 17 1998 werner@suse.de
- Remove hint during SuSEconfig.groff
* Thu Sep 03 1998 werner@suse.de
- Add three missed files
* Tue Aug 25 1998 werner@suse.de
- Skipt warn message if printer isn't configured
* Thu Aug 06 1998 werner@suse.de
- New version 1.11a
- Make docs and install them
- Add a auto configure script for SuSEconfig
- Make tmac/tmac.safer more safer: do not open files via .so
* Sun Jul 26 1998 bs@suse.de
- fixed name of GXDITVIEW
* Tue Oct 07 1997 florian@suse.de
- prepared spec file
- "bash 2.0" Fix in Makefile