diff options
author | Mike Frysinger <vapier@gentoo.org> | 2010-07-24 08:18:34 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2010-07-24 08:18:34 +0000 |
commit | 285d741e99767d211825a546826739269d90308a (patch) | |
tree | 4f056ca297acd0f42afebc6ef85c598d375fcf43 /sys-apps/groff | |
parent | Removed dev-ruby/amrita from tree. (diff) | |
download | historical-285d741e99767d211825a546826739269d90308a.tar.gz historical-285d741e99767d211825a546826739269d90308a.tar.bz2 historical-285d741e99767d211825a546826739269d90308a.zip |
Add tmac fix from upstream #263524 by Horst Prote. Add memory fixes from upstream #294045 by Maurice van der Pot.
Package-Manager: portage-2.2_rc67/cvs/Linux x86_64
Diffstat (limited to 'sys-apps/groff')
-rw-r--r-- | sys-apps/groff/ChangeLog | 13 | ||||
-rw-r--r-- | sys-apps/groff/Manifest | 22 | ||||
-rw-r--r-- | sys-apps/groff/files/groff-1.20.1-Thtml-mem-leak.patch | 70 | ||||
-rw-r--r-- | sys-apps/groff/files/groff-1.20.1-double-frees-mem-leaks.patch | 98 | ||||
-rw-r--r-- | sys-apps/groff/files/groff-1.20.1-tmac-ec.patch | 35 | ||||
-rw-r--r-- | sys-apps/groff/groff-1.20.1-r3.ebuild | 91 |
6 files changed, 320 insertions, 9 deletions
diff --git a/sys-apps/groff/ChangeLog b/sys-apps/groff/ChangeLog index 26647379947a..5f1889db58ff 100644 --- a/sys-apps/groff/ChangeLog +++ b/sys-apps/groff/ChangeLog @@ -1,6 +1,15 @@ # ChangeLog for sys-apps/groff -# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/groff/ChangeLog,v 1.103 2009/11/07 06:10:09 matsuu Exp $ +# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/groff/ChangeLog,v 1.104 2010/07/24 08:18:34 vapier Exp $ + +*groff-1.20.1-r3 (24 Jul 2010) + + 24 Jul 2010; Mike Frysinger <vapier@gentoo.org> +groff-1.20.1-r3.ebuild, + +files/groff-1.20.1-Thtml-mem-leak.patch, + +files/groff-1.20.1-double-frees-mem-leaks.patch, + +files/groff-1.20.1-tmac-ec.patch: + Add tmac fix from upstream #263524 by Horst Prote. Add memory fixes from + upstream #294045 by Maurice van der Pot. *groff-1.20.1-r2 (07 Nov 2009) diff --git a/sys-apps/groff/Manifest b/sys-apps/groff/Manifest index 8bb9592e4713..a8d3bd60fc8a 100644 --- a/sys-apps/groff/Manifest +++ b/sys-apps/groff/Manifest @@ -1,14 +1,22 @@ -AUX groff-1.19.2-infoext.patch 2779 RMD160 1f88f4ae40128b8496f7de47a91917dea777aee5 SHA1 013f1f36b868235d4a583bda62517a1b577ade98 SHA256 f6bcf74c010c187d8518dbe03918facdedad93b06fcf126fc4a3a58115778d22 +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA256 + AUX groff-1.19.2-man-unicode-dashes.patch 574 RMD160 759b9822f6950eeaac78ac16cfc8ebf58a77be38 SHA1 a7859ebef38fc0e2d73c1bc500e716c77ce8dc47 SHA256 e8fa93d3536bb6053ec104b567444cec7da8f101e24923dc4003efc8b7bf5bbe -AUX groff-1.19.2-parallel-make.patch 620 RMD160 57ffb1ccd56f1de7ef94f99187f51dceab116c20 SHA1 44add9e98ec14e6c0dfd72d9bcb2249bd46a0542 SHA256 ac213a872f5f96c36fdb098578f032b09dfebd7cf4e192da98813781f400dafe -DIST groff-1.19.2-japanese.patch.bz2 160688 RMD160 4f52a0ac81c20bc5f8cb308d0fc08fd99c42e907 SHA1 50a4612657b2ac2b7852c69c8cbca08021f3956f SHA256 67c09321a9190a33ad4c9d2c5ca8462ddaa235dd1c230a80ae6eef6236053c41 -DIST groff-1.19.2.tar.gz 2903263 RMD160 d5e57fa1d71dbff2c59a40a5a68c7417ffe211c9 SHA1 cfad99a5c52933a6a9180e394bd94fbaec0ac956 SHA256 d864fbd0bf6dea24e4f71736da9902a1cae86d0a1a893b5fe17118927257ec3e +AUX groff-1.20.1-Thtml-mem-leak.patch 1814 RMD160 e10f328091986ce4a9c3b6e3c7624a48befbecd6 SHA1 db01f9081d2dacf06476913fac3538f9dfa608fd SHA256 b0fc131d0deed47ebe6432fddf93ef8e2bca2dec8f460a39441fadd76361dc8f +AUX groff-1.20.1-double-frees-mem-leaks.patch 2752 RMD160 4aedb3ced29c09120df170331c5fb439695c039c SHA1 627d3214018a161b29d217abb64874b04c5d5303 SHA256 f4e53e33fbb5ca53841b0984ea9281a5009243ac59b774373c1dd4a9b257dd75 +AUX groff-1.20.1-tmac-ec.patch 763 RMD160 ed2df5ee3287d109b1efa85751c6620553e4b251 SHA1 76516a1a0794f310b74875d80b6651fe19735108 SHA256 5d141c2389da50a689b1f7ac6b704c25b42041b96f6b1a28faa3080084d1fdb9 DIST groff-1.20.1-japanese.patch.bz2 52503 RMD160 6b07ac62c5bb8bff99ef31619b434015081f6df7 SHA1 b335de765f8a5b1d34396457d19430ce04ca3e5b SHA256 a07fe0fcb8f10ba6f992797546c795eecd4347128cef79d9bc7cc1ea87fe795b DIST groff-1.20.1-r2-japanese.patch.bz2 52496 RMD160 a099b495315cc7d5863d756e227b67916d37d5f8 SHA1 7c689412f817e3326cdd8ee1d002a3a6562b9f54 SHA256 becc287fd0a748b73a04bbf45f0a3add6fc4754490b009c35624d0c93125b476 DIST groff-1.20.1.tar.gz 3594658 RMD160 ec311727206d183fb04f1b4bd01c1284142fdb52 SHA1 3066587d73df73c2bda235034f4515cf52d22549 SHA256 b645878135cb620c6c417c5601bfe96172245af12045540d7344938b4c2cd805 -EBUILD groff-1.19.2-r3.ebuild 2352 RMD160 f4d8b8d41a8662e45605c40c4b1b6eb567c37de3 SHA1 043f36e341f5db4c18a4e3f624581424516b3723 SHA256 ecc394a4fab64fc609298634a05091a191e6879fd4ccc4034fe1608d7da000af EBUILD groff-1.20.1-r1.ebuild 2215 RMD160 252a54bdbdd7c9e78491ab62c3204c0314ff0263 SHA1 e1cf868dea80e04ea426e66d4bffdb812a908ca3 SHA256 962cb04b7a4541daf659d5a38a1b6e6419ce3cc89d809ea3b796f42a320c0dd7 EBUILD groff-1.20.1-r2.ebuild 2239 RMD160 3147f1e56e9a804259ff2c976ca52cb5ff2c1a9a SHA1 73d17692e6ecf00de28678b66e8b54bdd7410f47 SHA256 191b5f85bf885990a37928a62d0ff2317e4f1a6294743f57f4f7aee0b7b25050 -EBUILD groff-1.20.1.ebuild 1773 RMD160 d5c14aa69c275fd88388b21dad7887c2c44927e0 SHA1 46b367a7923d407b41a04c65e61301f84598ea11 SHA256 4a56aa85d8015dca92305085dfd8ecd53cad94a4a7850c1d1a1ac9180bf04d5b -MISC ChangeLog 14149 RMD160 ae3c65b2bcec8531e6af4df96368c11dcd621d8a SHA1 3118e9e63dd47f3e2f5901d353cdd9ce02a3f03a SHA256 1cd06ce08e0cde7def1f506f0ae2ae963eb36aec37b02407eafb3bcdeafa306f +EBUILD groff-1.20.1-r3.ebuild 2410 RMD160 fae6fa2fbad32d1b32fbf4b31cf1f5001e133546 SHA1 008803a6c708eecc7bc68217c6a13d8a2f76cbc9 SHA256 2386f5425db25f68f88316ac70a4ffed6b19fd2cd59ad4705501909fd01af607 +MISC ChangeLog 14508 RMD160 57f76484844cfb9d6c8ec82ec194d966aec3a28f SHA1 91a3d748845c4f0b1ee08fa9a4bef231a4aa2e78 SHA256 2b31fb813a5d846eb5eaef2b98afe83b9d308b9185b246d7978476953d2ad135 MISC metadata.xml 164 RMD160 f43cbec30b7074319087c9acffdb9354b17b0db3 SHA1 9c213f5803676c56439df3716be07d6692588856 SHA256 f5f2891f2a4791cd31350bb2bb572131ad7235cd0eeb124c9912c187ac10ce92 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2.0.15 (GNU/Linux) + +iF4EAREIAAYFAkxKoc8ACgkQTwhj9JtAlp5GPQD/e2JLfrdY8XXC7qVmzo/VrOQr +o2wIqm6YjEh2MLEMaF0A/0S1Ns4prQb6dlAgJa2nNRbDrmPAqN51B01wc6BVE4yh +=KkD4 +-----END PGP SIGNATURE----- diff --git a/sys-apps/groff/files/groff-1.20.1-Thtml-mem-leak.patch b/sys-apps/groff/files/groff-1.20.1-Thtml-mem-leak.patch new file mode 100644 index 000000000000..b95ed426280f --- /dev/null +++ b/sys-apps/groff/files/groff-1.20.1-Thtml-mem-leak.patch @@ -0,0 +1,70 @@ +https://bugs.gentoo.org/294045 + +From f68481cd98e1d8451dd16d6d1b1b3513110a5559 Mon Sep 17 00:00:00 2001 +From: wl <wl> +Date: Fri, 10 Apr 2009 18:13:29 +0000 +Subject: [PATCH] Fix a memory leak in troff for -Thtml. + Reported by Urs Eggli <Urs.Eggli@zuerich.ch>. + +* src/roff/troff/node.h (node::~node): Move to... +* src/roff/troff/node.cpp: Here. Free `state' and `push_state'. +--- + ChangeLog | 8 ++++++++ + src/roff/troff/node.cpp | 11 ++++++++++- + src/roff/troff/node.h | 4 ---- + 3 files changed, 18 insertions(+), 5 deletions(-) + +diff --git a/src/roff/troff/node.cpp b/src/roff/troff/node.cpp +index afe4998..58cf59a 100644 +--- a/src/roff/troff/node.cpp ++++ b/src/roff/troff/node.cpp +@@ -1811,6 +1811,14 @@ void suppress_output_file::really_transparent_char(unsigned char) + { + } + ++inline node::~node() ++{ ++ if (state != 0) ++ delete state; ++ if (push_state != 0) ++ delete push_state; ++} ++ + /* glyphs, ligatures, kerns, discretionary breaks */ + + class charinfo_node : public node { +@@ -4643,7 +4651,7 @@ void hline_node::tprint(troff_output_file *out) + } + else { + hunits rem = x - w*i; +- if (rem > H0) ++ if (rem > H0) { + if (n->overlaps_horizontally()) { + if (out->is_on()) + n->tprint(out); +@@ -4651,6 +4659,7 @@ void hline_node::tprint(troff_output_file *out) + } + else + out->right(rem); ++ } + while (--i >= 0) + if (out->is_on()) + n->tprint(out); +diff --git a/src/roff/troff/node.h b/src/roff/troff/node.h +index a598ae5..9850be2 100644 +--- a/src/roff/troff/node.h ++++ b/src/roff/troff/node.h +@@ -132,10 +132,6 @@ inline node::node(node *n, statem *s, int divlevel) + state = 0; + } + +-inline node::~node() +-{ +-} +- + // 0 means it doesn't, 1 means it does, 2 means it's transparent + + int node_list_ends_sentence(node *); +-- +1.7.1.1 + diff --git a/sys-apps/groff/files/groff-1.20.1-double-frees-mem-leaks.patch b/sys-apps/groff/files/groff-1.20.1-double-frees-mem-leaks.patch new file mode 100644 index 000000000000..d618030443a2 --- /dev/null +++ b/sys-apps/groff/files/groff-1.20.1-double-frees-mem-leaks.patch @@ -0,0 +1,98 @@ +https://bugs.gentoo.org/294045 + +From be095a293e09eae67254f59ce878b1a36233b447 Mon Sep 17 00:00:00 2001 +From: wl <wl> +Date: Tue, 24 Nov 2009 13:32:17 +0000 +Subject: [PATCH] Fix double frees and memory leaks. + +* src/roff/troff/env.cpp (environment::make_tag): Use local object. +* src/roff/troff/input.cpp (input_stack::check_end_diversion): Free +`diversion_state' here. +(interpolate_arg): Fix memory leaks. +* src/roff/troff/mtsm.cpp (mtsm::pop_state): Don't free `sp->state'. +--- + ChangeLog | 10 ++++++++++ + src/roff/troff/env.cpp | 13 +++++++------ + src/roff/troff/input.cpp | 5 +++++ + src/roff/troff/mtsm.cpp | 2 -- + 4 files changed, 22 insertions(+), 8 deletions(-) + +diff --git a/src/roff/troff/env.cpp b/src/roff/troff/env.cpp +index 56bfe21..13672cc 100644 +--- a/src/roff/troff/env.cpp ++++ b/src/roff/troff/env.cpp +@@ -2213,14 +2213,15 @@ node *environment::make_tag(const char *nm, int i) + */ + if (curdiv == topdiv && topdiv->before_first_page) + topdiv->begin_page(); +- macro *m = new macro; +- m->append_str("devtag:"); ++ ++ macro m; ++ m.append_str("devtag:"); + for (const char *p = nm; *p; p++) + if (!invalid_input_char((unsigned char)*p)) +- m->append(*p); +- m->append(' '); +- m->append_int(i); +- return new special_node(*m); ++ m.append(*p); ++ m.append(' '); ++ m.append_int(i); ++ return new special_node(m); + } + return 0; + } +diff --git a/src/roff/troff/input.cpp b/src/roff/troff/input.cpp +index 17d2451..7c816e8 100644 +--- a/src/roff/troff/input.cpp ++++ b/src/roff/troff/input.cpp +@@ -531,6 +531,8 @@ void input_stack::check_end_diversion(input_iterator *t) + { + if (t->is_diversion) { + div_level--; ++ if (diversion_state) ++ delete diversion_state; + diversion_state = t->diversion_state; + } + } +@@ -4398,6 +4400,7 @@ static void interpolate_arg(symbol nm) + args += c; + if (i != limit) + args += ' '; ++ delete p; + } + if (limit > 0) { + args += '\0'; +@@ -4419,6 +4422,7 @@ static void interpolate_arg(symbol nm) + args += '"'; + if (i != limit) + args += ' '; ++ delete p; + } + if (limit > 0) { + args += '\0'; +@@ -4438,6 +4442,7 @@ static void interpolate_arg(symbol nm) + } + if (input_stack::space_follows_arg(i)) + args += ' '; ++ delete p; + } + if (limit > 0) { + args += '\0'; +diff --git a/src/roff/troff/mtsm.cpp b/src/roff/troff/mtsm.cpp +index 83a6906..79e2f78 100644 +--- a/src/roff/troff/mtsm.cpp ++++ b/src/roff/troff/mtsm.cpp +@@ -390,8 +390,6 @@ void mtsm::pop_state() + #endif + if (sp == 0) + fatal("empty state machine stack"); +- if (sp->state) +- delete sp->state; + sp->state = 0; + stack *t = sp; + sp = sp->next; +-- +1.7.1.1 + diff --git a/sys-apps/groff/files/groff-1.20.1-tmac-ec.patch b/sys-apps/groff/files/groff-1.20.1-tmac-ec.patch new file mode 100644 index 000000000000..20a15c6e21a7 --- /dev/null +++ b/sys-apps/groff/files/groff-1.20.1-tmac-ec.patch @@ -0,0 +1,35 @@ +https://bugs.gentoo.org/263524 + +revision 1.40 +date: 2009-04-01 02:59:08 -0400; author: wl; state: Exp; lines: +3 -3; commitid: VIC1bezuXvKqxhIt; + +* tmac/doc.tmac: Call `ec' before mapping characters. + +Index: tmac/doc.tmac +=================================================================== +RCS file: /sources/groff/groff/tmac/doc.tmac,v +retrieving revision 1.39 +retrieving revision 1.40 +diff -u -p -r1.39 -r1.40 +--- tmac/doc.tmac 2 Jan 2009 23:16:20 -0000 1.39 ++++ tmac/doc.tmac 1 Apr 2009 06:59:08 -0000 1.40 +@@ -6425,6 +6425,9 @@ + .blm doc-empty-line + . + . ++.ec ++. ++. + .\" For UTF-8, map some characters conservatively for the sake + .\" of easy cut and paste. + . +@@ -6438,9 +6441,6 @@ + .\} + . + . +-.ec +-. +-. + .\" load local modifications + .mso mdoc.local + . diff --git a/sys-apps/groff/groff-1.20.1-r3.ebuild b/sys-apps/groff/groff-1.20.1-r3.ebuild new file mode 100644 index 000000000000..c4642c204f4f --- /dev/null +++ b/sys-apps/groff/groff-1.20.1-r3.ebuild @@ -0,0 +1,91 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/groff/groff-1.20.1-r3.ebuild,v 1.1 2010/07/24 08:18:34 vapier Exp $ + +inherit autotools eutils toolchain-funcs + +DESCRIPTION="Text formatter used for man pages" +HOMEPAGE="http://www.gnu.org/software/groff/groff.html" +SRC_URI="mirror://gnu/groff/${P}.tar.gz + linguas_ja? ( mirror://gentoo/${P}-r2-japanese.patch.bz2 )" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd" +IUSE="examples X linguas_ja" + +DEPEND=">=sys-apps/texinfo-4.7-r1 + X? ( + x11-libs/libX11 + x11-libs/libXt + x11-libs/libXmu + x11-libs/libXaw + x11-libs/libSM + x11-libs/libICE + )" + +src_unpack() { + unpack ${A} + cd "${S}" + + epatch "${FILESDIR}"/${PN}-1.19.2-man-unicode-dashes.patch #16108 #17580 #121502 + epatch "${FILESDIR}"/${P}-tmac-ec.patch #263524 + epatch "${FILESDIR}"/${P}-Thtml-mem-leak.patch #294045 + epatch "${FILESDIR}"/${P}-double-frees-mem-leaks.patch #294045 + + # put the docs in the Gentoo-specific spot + sed -i \ + -e '/^docdir=/s/=.*/=@docdir@/' \ + Makefile.in \ + || die "sed failed" + + # Make sure we can cross-compile this puppy + if tc-is-cross-compiler ; then + sed -i \ + -e '/^GROFFBIN=/s:=.*:=/usr/bin/groff:' \ + -e '/^TROFFBIN=/s:=.*:=/usr/bin/troff:' \ + -e '/^GROFF_BIN_PATH=/s:=.*:=:' \ + -e '/^GROFF_BIN_DIR=/s:=.*:=:' \ + contrib/*/Makefile.sub \ + doc/Makefile.in \ + doc/Makefile.sub || die "cross-compile sed failed" + fi + + cat <<-EOF >> tmac/mdoc.local + .ds volume-operating-system Gentoo + .ds operating-system Gentoo/${KERNEL} + .ds default-operating-system Gentoo/${KERNEL} + EOF + + if use linguas_ja ; then + epatch "${WORKDIR}"/${PF}-japanese.patch #255292 + eautoconf + eautoheader + fi +} + +src_compile() { + # Fix problems with not finding g++ +# tc-export CC CXX + econf \ + --with-appresdir=/usr/share/X11/app-defaults \ + --docdir=/usr/share/doc/${PF} \ + $(use_with X x) \ + $(use linguas_ja && echo --enable-japanese) + emake || die +} + +src_install() { + emake install DESTDIR="${D}" || die + + # The following links are required for man #123674 + dosym eqn /usr/bin/geqn + dosym tbl /usr/bin/gtbl + + dodoc BUG-REPORT ChangeLog MORE.STUFF NEWS \ + PROBLEMS PROJECTS README REVISION TODO VERSION + + if ! use examples ; then + rm -rf "${D}"/usr/share/doc/${PF}/examples + fi +} |