Security update
authorDaniel Ahlberg <aliz@gentoo.org>
Sat, 19 Oct 2002 17:40:44 +0000 (17:40 +0000)
committerDaniel Ahlberg <aliz@gentoo.org>
Sat, 19 Oct 2002 17:40:44 +0000 (17:40 +0000)
sys-apps/groff/ChangeLog
sys-apps/groff/files/digest-groff-1.17.2-r3 [new file with mode: 0644]
sys-apps/groff/files/groff-1.17.2-r3-gentoo.diff [new file with mode: 0644]
sys-apps/groff/groff-1.17.2-r3.ebuild [new file with mode: 0644]

index 9c8855f0aa7c9bd8f6143d59c6bf328bdea44f8b..5126a8ad98611e23b6bcdfa7f41caace6cc17d96 100644 (file)
@@ -1,6 +1,11 @@
 # ChangeLog for sys-apps/groff
 # Copyright 2002 Gentoo Technologies, Inc.; Distributed under the GPL
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/groff/ChangeLog,v 1.4 2002/07/29 16:23:23 azarah Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/groff/ChangeLog,v 1.5 2002/10/19 17:40:43 aliz Exp $
+
+*grpff-1.17.2-r3 (19 Oct 2002)
+
+  19 Oct 2002; Daniel Ahlberg <aliz@gentoo.org> :
+  Security update.
 
 *groff-1.18-r1 (29 Jul 2002)
 *groff-1.17.2-r2 (29 Jul 2002)
diff --git a/sys-apps/groff/files/digest-groff-1.17.2-r3 b/sys-apps/groff/files/digest-groff-1.17.2-r3
new file mode 100644 (file)
index 0000000..47b83c6
--- /dev/null
@@ -0,0 +1 @@
+MD5 9564e58e553e7a8d4c6e73a782f296ce groff-1.17.2.tar.gz 1503169
diff --git a/sys-apps/groff/files/groff-1.17.2-r3-gentoo.diff b/sys-apps/groff/files/groff-1.17.2-r3-gentoo.diff
new file mode 100644 (file)
index 0000000..f9734de
--- /dev/null
@@ -0,0 +1,35 @@
+--- groff-1.17.2.orig/src/preproc/pic/pic.y
++++ groff-1.17.2/src/preproc/pic/pic.y
+@@ -1769,8 +1769,7 @@
+       return strsave(form);
+     }
+   }
+-  sprintf(sprintf_buf, form, n);
+-  return strsave(sprintf_buf);
++  return do_sprintf(form, &n, 1);
+ }
+
+ char *do_sprintf(const char *form, const double *v, int nv)
+@@ -1792,18 +1791,19 @@
+       if (*form == '%') {
+       one_format += *form++;
+       one_format += '\0';
+-      sprintf(sprintf_buf, one_format.contents());
++      snprintf(sprintf_buf, sizeof(sprintf_buf), "%s", one_format.contents());
+       }
+       else {
+       if (i >= nv) {
+-        lex_error("too few arguments to sprintf");
++        lex_error("too few arguments to snprintf");
+         result += one_format;
+         result += form;
+         break;
+       }
+       one_format += *form++;
+       one_format += '\0';
+-      sprintf(sprintf_buf, one_format.contents(), v[i++]);
++      snprintf(sprintf_buf, sizeof(sprintf_buf),
++               one_format.contents(), v[i++]);
+       }
+       one_format.clear();
+       result += sprintf_buf;
diff --git a/sys-apps/groff/groff-1.17.2-r3.ebuild b/sys-apps/groff/groff-1.17.2-r3.ebuild
new file mode 100644 (file)
index 0000000..89fa746
--- /dev/null
@@ -0,0 +1,86 @@
+# Copyright 1999-2002 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/groff/groff-1.17.2-r3.ebuild,v 1.1 2002/10/19 17:40:43 aliz Exp $
+
+S=${WORKDIR}/${P}
+DESCRIPTION="Text formatter used for man pages"
+SRC_URI="ftp://gatekeeper.dec.com/pub/GNU/groff/${P}.tar.gz"
+HOMEPAGE="http://www.gnu.org/software/groff/groff.html"
+
+KEYWORDS="x86 sparc sparc64 alpha"
+SLOT="0"
+LICENSE="GPL-2"
+
+DEPEND="virtual/glibc"
+
+src_unpack() {
+       unpack ${A}
+
+    # Fix the info pages to have .info extensions,
+       # else they do not get gzipped.
+       cd ${S}
+       patch -p1 < ${FILESDIR}/${P}-infoext.patch || die
+
+       patch -p1 < ${FILESDIR}/${PF}-gentoo.diff || die
+
+}
+
+src_compile() {
+       # Fix problems with not finding g++
+       [ -z "${CC}" ] && export CC="gcc"
+       [ -z "${CXX}" ] && export CXX="g++"
+       
+       ./configure --host=${CHOST} \
+               --prefix=/usr \
+               --mandir=/usr/share/man || die
+               
+       # emake doesn't work
+       make || die
+       
+       # do the info pages.  this is only needed for 1.17*,
+       # as 1.18 do install its info pages
+       cd ${S}/doc
+       make groff.info || die
+
+       # Only build X stuff if we have X installed, but do
+       # not depend on it, else we get circular deps.
+       if [ -n "`use X`" ] && [ -x /usr/X11R6/bin/xmkmf ]
+       then
+               cd ${S}/src/xditview
+               xmkmf || die
+               make depend all || die
+       fi
+}
+
+src_install() {
+       dodir /usr /usr/share/doc/${PF}/{examples,html}
+       make prefix=${D}/usr \
+               manroot=${D}/usr/share/man \
+               docdir=${D}/usr/share/doc/${PF} \
+               install || die
+
+       if [ -n "`use X`" ] && [ -x /usr/X11R6/bin/xmkmf ]
+       then
+               cd ${S}/src/xditview
+               make DESTDIR=${D} \
+                       BINDIR=/usr/bin \
+                       MANPATH=/usr/share/man \
+                       install \
+                       install.man || die
+       fi
+       
+       # the following links are required for xman
+       dosym eqn /usr/bin/geqn
+       dosym tbl /usr/bin/gtbl
+       dosym soelim /usr/bin/zsoelim
+
+       # this is only needed for 1.17*, as 1.18
+       # do install its info pages
+       cd ${S}/doc
+       doinfo groff.info*
+
+       cd ${S}
+       dodoc BUG-REPORT COPYING ChangeLog FDL MORE.STUFF NEWS \
+               PROBLEMS PROJECTS README REVISION TODO VERSION
+}
+