summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2004-09-19 21:19:05 +0000
committerMike Frysinger <vapier@gentoo.org>2004-09-19 21:19:05 +0000
commitbf871064ce5ddf4d31a0d8278b0c76481cfce5e0 (patch)
tree181d03a0147cd5b4b00afde8b19b2d6e4cb4ee1c /sys-apps/groff
parentVersion bump #64539 by Stefan Schweizer. (Manifest recommit) (diff)
downloadgentoo-2-bf871064ce5ddf4d31a0d8278b0c76481cfce5e0.tar.gz
gentoo-2-bf871064ce5ddf4d31a0d8278b0c76481cfce5e0.tar.bz2
gentoo-2-bf871064ce5ddf4d31a0d8278b0c76481cfce5e0.zip
fix stack issues #64117
Diffstat (limited to 'sys-apps/groff')
-rw-r--r--sys-apps/groff/ChangeLog9
-rw-r--r--sys-apps/groff/files/digest-groff-1.19.1-r11
-rw-r--r--sys-apps/groff/files/groff-1.19.1-stack.patch176
-rw-r--r--sys-apps/groff/groff-1.19.1-r1.ebuild126
4 files changed, 311 insertions, 1 deletions
diff --git a/sys-apps/groff/ChangeLog b/sys-apps/groff/ChangeLog
index ae1c56472b16..4633f8324b98 100644
--- a/sys-apps/groff/ChangeLog
+++ b/sys-apps/groff/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for sys-apps/groff
# Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/groff/ChangeLog,v 1.43 2004/09/13 07:29:55 solar Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/groff/ChangeLog,v 1.44 2004/09/19 21:19:05 vapier Exp $
+
+*groff-1.19.1-r1 (19 Sep 2004)
+
+ 19 Sep 2004; Mike Frysinger <vapier@gentoo.org>
+ +files/groff-1.19.1-stack.patch, +groff-1.19.1-r1.ebuild:
+ Add patch to fix stack issues with X.org and such #64117 by Matteo Settenvini
+ and Stephane LOEUILLET.
13 Sep 2004; <solar@gentoo.org> groff-1.19.1.ebuild:
minor touchups to the ebuild
diff --git a/sys-apps/groff/files/digest-groff-1.19.1-r1 b/sys-apps/groff/files/digest-groff-1.19.1-r1
new file mode 100644
index 000000000000..3c6ac6b3507b
--- /dev/null
+++ b/sys-apps/groff/files/digest-groff-1.19.1-r1
@@ -0,0 +1 @@
+MD5 57d155378640c12a80642664dfdfc892 groff-1.19.1.tar.gz 2629152
diff --git a/sys-apps/groff/files/groff-1.19.1-stack.patch b/sys-apps/groff/files/groff-1.19.1-stack.patch
new file mode 100644
index 000000000000..d0061aef4071
--- /dev/null
+++ b/sys-apps/groff/files/groff-1.19.1-stack.patch
@@ -0,0 +1,176 @@
+--- groff-1.19.1/tmac/s.tmac 2004-04-16 06:34:21.000000000 +0200
++++ groff/tmac/s.tmac 2004-08-05 18:38:23.000000000 +0200
+@@ -188,7 +188,10 @@
+ .di cov*au-div!\\n[cov*n-au]
+ .nf
+ .ft I
+-.ps \\n[PS]
++.ie (\\n[PS] >= 1000) \
++. ps (\\n[PS]z / 1000u)
++.el \
++. ps \\n[PS]
+ ..
+ .de @AI
+ .if !'\*(.T'html' .par@reset
+@@ -201,7 +204,10 @@
+ . di cov*ai-div!\\n[cov*n-au]
+ . nf
+ . ft R
+-. ps \\n[PS]
++. ie (\\n[PS] >= 1000) \
++. ps (\\n[PS]z / 1000u)
++. el \
++. ps \\n[PS]
+ .\}
+ ..
+ .de LP
+@@ -499,7 +505,6 @@
+ .nr PN \\n%
+ .nr pg*col-num 0
+ .nr pg@fn-bottom-margin 0
+-.nr pg*saved-po \\n[PO]
+ .po \\n[PO]u
+ .ev h
+ .par@reset
+@@ -536,12 +541,12 @@
+ ..
+ .de pg*end-col
+ 'sp |\\n[pg*col-top]u
+-.po (u;\\n[pg*saved-po]+(\\n[pg@colw]+\\n[pg*gutw]*\\n[pg*col-num]))
++.po (u;\\n[PO]+(\\n[pg@colw]+\\n[pg*gutw]*\\n[pg*col-num]))
+ .\"po +(u;\\n[pg@colw]+\\n[pg*gutw])
+ .pg*start-col
+ ..
+ .de pg*end-page
+-.po \\n[pg*saved-po]u
++.po \\n[PO]u
+ .\" Make sure we don't exit if there are still floats or footnotes left-over.
+ .ie \\n[kp@head]<\\n[kp@tail]:\\n[fn@have-overflow] \{\
+ . \" Switching environments ensures that we don't get an unnecessary
+@@ -873,7 +878,6 @@
+ .ds*end!\\n[\\n[.ev]:ds-type]
+ .nr \\n[.ev]:ds-type 0
+ ..
+-.als De DE
+ .de ds@auto-end
+ .if \\n[\\n[.ev]:ds-type] \{\
+ . @error automatically terminating display
+@@ -951,7 +955,6 @@
+ . nr \\n[.ev]:ds-type 3
+ .\}
+ ..
+-.als Ds DS
+ .de ds@need
+ .if '\\n(.z'' \{\
+ . while \\n[.t]<=(\\$1)&(\\n[nl]>\\n[pg@header-bottom]) \{\
+@@ -999,10 +1002,23 @@
+ .\" don't set LT so that it can be defaulted from LL
+ .ie rLT .lt \\n[LT]u
+ .el .lt \\n[LL]u
+-.ps \\n[PS]
++.ie (\\n[PS] >= 1000) \
++. ps (\\n[PS]z / 1000u)
++.el \
++. ps \\n[PS]
+ .\" don't set VS so that it can be defaulted from PS
+-.ie rVS .par*vs \\n[VS]
+-.el .par*vs \\n[PS]+2
++.ie rVS \{\
++. ie (\\n[VS] >= 1000) \
++. par*vs "(\\n[VS]p / 1000u)"
++. el \
++. par*vs \\n[VS]
++.\}
++.el \{\
++. ie (\\n[PS] >= 1000) \
++. par*vs "((\\n[PS]p / 1000u) + 2p)"
++. el \
++. par*vs "(\\n[PS] + 2)"
++.\}
+ .if dFAM .fam \\*[FAM]
+ .if !rHY .nr HY 14
+ .hy \\n[HY]
+@@ -1034,16 +1050,37 @@
+ .de par@init
+ .if !rLT .nr LT \\n[LL]
+ .if !rFL .nr FL \\n[LL]*5/6
+-.if !rVS .nr VS \\n[PS]+2
++.if !rVS \{\
++. ie (\\n[PS] >= 1000) \
++. nr VS (\\n[PS] + 2000)
++. el \
++. nr VS (\\n[PS] + 2)
++.\}
+ .if !rDI .nr DI .5i
+-.if !rFPS .nr FPS \\n[PS]-2
+-.if !rFVS .nr FVS \\n[FPS]+2
++.if !rFPS \{\
++. ie (\\n[PS] >= 1000) \
++. nr FPS (\\n[PS] - 2000)
++. el \
++. nr FPS (\\n[PS] - 2)
++.\}
++.if !rFVS \{\
++. ie (\\n[FPS] >= 1000) \
++. nr FVS (\\n[FPS] + 2000)
++. el \
++. nr FVS (\\n[FPS] + 2)
++.\}
+ .\" don't change environment 0
+ .ev h
+-.ps \\n[PS]
++.ie (\\n[PS] >= 1000) \
++. ps (\\n[PS]z / 1000u)
++.el \
++. ps \\n[PS]
+ .if !rQI .nr QI 5n
+ .if !rPI .nr PI 5n
+-.par*vs \\n[VS]
++.ie (\\n[VS] >= 1000) \
++. par*vs "(\\n[VS]p / 1000u)"
++.el \
++. par*vs \\n[VS]
+ .if !rPD .nr PD .3v>?\n(.V
+ .if !rDD .nr DD .5v>?\n(.V
+ .if !rFI .nr FI 2n
+@@ -1101,8 +1138,14 @@
+ .in (u;\\n[\\n[.ev]:li]+\\n[\\n[.ev]:pli])
+ .ft 1
+ .fam \\*[FAM]
+-.ps \\n[\\n[.ev]:PS]
+-.par*vs \\n[\\n[.ev]:VS]
++.ie (\\n[\\n[.ev]:PS] >= 1000) \
++. ps (\\n[\\n[.ev]:PS]z / 1000u)
++.el \
++. ps \\n[\\n[.ev]:PS]
++.ie (\\n[\\n[.ev]:VS] >= 1000) \
++. par*vs "(\\n[\\n[.ev]:VS]p / 1000u)"
++.el \
++. par*vs \\n[\\n[.ev]:VS]
+ .ls 1
+ .TA
+ .hy \\n[HY]
+@@ -1357,7 +1400,10 @@
+ ..
+ .\" In paragraph macros.
+ .de NL
+-.ps \\n[\\n[.ev]:PS]
++.ie (\\n[\\n[.ev]:PS] >= 1000) \
++. ps (\\n[\\n[.ev]:PS]z / 1000u)
++.el \
++. ps \\n[\\n[.ev]:PS]
+ ..
+ .de SM
+ .ps -2
+@@ -1545,7 +1591,10 @@
+ .1C
+ .if !'\\$1'no' \{\
+ . ce 1
+-. ps \\n[PS]+2
++. ie (\\n[PS] >= 1000) \
++. ps ((\\n[PS]z / 1000u) + 2z)
++. el \
++. ps \\n[PS]+2
+ . ft B
+ \\*[TOC]
+ . ft
diff --git a/sys-apps/groff/groff-1.19.1-r1.ebuild b/sys-apps/groff/groff-1.19.1-r1.ebuild
new file mode 100644
index 000000000000..fe76b989c841
--- /dev/null
+++ b/sys-apps/groff/groff-1.19.1-r1.ebuild
@@ -0,0 +1,126 @@
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/groff/groff-1.19.1-r1.ebuild,v 1.1 2004/09/19 21:19:05 vapier Exp $
+
+inherit eutils flag-o-matic gcc
+
+MB_PATCH="groff_1.18.1-7" #"${P/-/_}-7"
+DESCRIPTION="Text formatter used for man pages"
+HOMEPAGE="http://www.gnu.org/software/groff/groff.html"
+SRC_URI="mirror://gnu/groff/${P}.tar.gz"
+# cjk? ( http://people.debian.org/~ukai/groff/${MB_PATCH}.diff.gz )"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86 ~ppc ~sparc ~mips alpha arm ~hppa amd64 ~ia64 ~ppc64 s390"
+IUSE="X" # cjk"
+
+DEPEND="virtual/libc
+ >=sys-apps/texinfo-4.0"
+PDEPEND=">=sys-apps/man-1.5k-r1"
+
+src_unpack() {
+ unpack ${A}
+ cd ${S}
+
+# if use cjk
+# then
+ # multibyte patch contains no-color-segfault
+# epatch ${WORKDIR}/${MB_PATCH}.diff
+# epatch ${FILESDIR}/${MB_PATCH}-fix.patch
+# fi
+
+ # Fix the info pages to have .info extensions,
+ # else they do not get gzipped.
+ epatch ${FILESDIR}/groff-1.18-infoext.patch
+
+ # Do not generate example files that require us to
+ # depend on netpbm.
+ epatch ${FILESDIR}/groff-1.18-no-netpbm-depend.patch
+
+ # Make dashes the same as minus on the keyboard so that you
+ # can search for it. Fixes #17580 and #16108
+ # Thanks to James Cloos <cloos@jhcloos.com>
+ epatch ${FILESDIR}/${PN}-man-UTF-8.diff
+
+ # Fix syntax error in pic2graph. Closes #32300.
+ sed -i -e "s:groffpic_opts=\"-U\":groffpic_opts=\"-U\";;:" \
+ contrib/pic2graph/pic2graph.sh || die
+
+ # Fix stack limit (inifite loop) #64117
+ epatch ${FILESDIR}/${P}-stack.patch
+}
+
+src_compile() {
+ local myconf=
+
+ # Fix problems with not finding g++
+ export CC="$(gcc-getCC)"
+ export CXX="$(gcc-getCXX)"
+
+ case ${ARCH} in
+ alpha)
+ # -Os causes segfaults, -O is probably a fine replacement
+ # (fixes bug 36008, 06 Jan 2004 agriffis)
+ replace-flags -Os -O
+ ;;
+ hppa)
+ # -march=2.0 makes groff unable to finish the compile process
+ export CFLAGS="${CFLAGS/-march=2.0/}"
+ export CXXFLAGS="${CXXFLAGS/-march=2.0/}"
+ ;;
+ esac
+
+# myconf="${myconf} `use_enable cjk multibyte`"
+
+ # this is incredibly broken, i have no idea why people are trying to use
+ # it... even the documentation on it states that -fnew-ra is "meant only
+ # for testing. Users should not specify this option, since it is not yet
+ # ready for production use."
+ filter-flags -fnew-ra
+
+ # many fun sandbox errors with econf
+ myconf="${myconf} --host=${CHOST} --prefix=/usr \
+ --mandir=/usr/share/man --infodir=\${inforoot}"
+ ./configure ${myconf} || die
+
+ # Parallel build doesn't work. Patched wanted.
+ emake -j1 || die
+
+ # Only build X stuff if we have X installed, but do
+ # not depend on it, else we get circular deps.
+ if 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 \
+ inforoot=${D}/usr/share/info \
+ docdir=${D}/usr/share/doc/${PF} \
+ install || die
+
+ if 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
+
+ cd ${S}
+ dodoc BUG-REPORT ChangeLog FDL MORE.STUFF NEWS \
+ PROBLEMS PROJECTS README REVISION TODO VERSION
+}