summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephanie J. Lockwood-Childs <wormo@gentoo.org>2006-07-31 06:10:31 +0000
committerStephanie J. Lockwood-Childs <wormo@gentoo.org>2006-07-31 06:10:31 +0000
commit08e2645d8286078de9c4253ade8743dc6d4136d6 (patch)
treea3d7049bd0ebc529920ca445b452d4f04fc5ac08 /dev-util
parentinitial import (diff)
downloadgentoo-2-08e2645d8286078de9c4253ade8743dc6d4136d6.tar.gz
gentoo-2-08e2645d8286078de9c4253ade8743dc6d4136d6.tar.bz2
gentoo-2-08e2645d8286078de9c4253ade8743dc6d4136d6.zip
Patch to fix bug in handling of *INDENT-OFF* directive (Bug #125648):
make inhibited flag global so handle_token_comment() can tell if the comment was really the *INDENT-OFF* directive -- if so, print_comment() will be skipped because the line already got used up during the initial dump_line() (Portage version: 2.1-r1)
Diffstat (limited to 'dev-util')
-rw-r--r--dev-util/indent/ChangeLog13
-rw-r--r--dev-util/indent/files/2.2.9-indent-off-segfault.patch59
-rw-r--r--dev-util/indent/files/digest-indent-2.2.9-r33
-rw-r--r--dev-util/indent/indent-2.2.9-r3.ebuild39
-rw-r--r--dev-util/indent/metadata.xml11
5 files changed, 123 insertions, 2 deletions
diff --git a/dev-util/indent/ChangeLog b/dev-util/indent/ChangeLog
index 6353eeaa0bc1..3b732f91f67d 100644
--- a/dev-util/indent/ChangeLog
+++ b/dev-util/indent/ChangeLog
@@ -1,6 +1,15 @@
# ChangeLog for dev-util/indent
-# Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-util/indent/ChangeLog,v 1.22 2005/07/30 09:25:01 flameeyes Exp $
+# Copyright 2002-2006 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-util/indent/ChangeLog,v 1.23 2006/07/31 06:10:31 wormo Exp $
+
+*indent-2.2.9-r3 (01 Aug 2006)
+
+ 30 Jul 2006; Stephanie Lockwood-Childs <wormo@gentoo.org> +metadata.xml,
+ +files/2.2.9-indent-off-segfault.patch, +indent-2.2.9-r3.ebuild:
+ Patch to fix bug in handling of "*INDENT-OFF*" directive (Bug #125648):
+ make "inhibited" flag global so handle_token_comment() can tell if the comment
+ was really the "*INDENT-OFF*" directive -- if so, print_comment() will be
+ skipped because the line already got used up during the initial dump_line()
30 Jul 2005; Diego Pettenò <flameeyes@gentoo.org>
+files/2.2.9-malloc.patch, indent-2.2.9-r2.ebuild:
diff --git a/dev-util/indent/files/2.2.9-indent-off-segfault.patch b/dev-util/indent/files/2.2.9-indent-off-segfault.patch
new file mode 100644
index 000000000000..66ada66192a7
--- /dev/null
+++ b/dev-util/indent/files/2.2.9-indent-off-segfault.patch
@@ -0,0 +1,59 @@
+diff -ur indent-2.2.9.orig/src/indent.c indent-2.2.9/src/indent.c
+--- indent-2.2.9.orig/src/indent.c 2002-10-28 12:00:56.000000000 -0800
++++ indent-2.2.9/src/indent.c 2006-08-01 16:13:42.000000000 -0700
+@@ -103,6 +103,7 @@
+ unsigned long in_prog_size = 0U;
+ char * in_prog = NULL;
+ int break_line = 0;
++BOOLEAN inhibited = 0; /* Whether or not reformatting is currently disabled */
+
+ /* The position that we will line the current line up with when it comes time
+ * to print it (if we are lining up to parentheses). */
+@@ -2036,12 +2038,24 @@
+ BOOLEAN * force_nl,
+ BOOLEAN * flushed_nl)
+ {
++ BOOLEAN save_inhibited;
++
+ if (parser_state_tos->last_saw_nl && (s_code != e_code))
+ {
++ /* remember if this comment is actually *INDENT-OFF* directive */
++ save_inhibited = inhibited;
++
+ *flushed_nl = false;
+ dump_line(true, &paren_target);
+ parser_state_tos->want_blank = false;
+ *force_nl = false;
++
++ /* if the comment was *INDENT-OFF* directive, it has been used up already
++ * by dump_line() above so return now */
++ if (save_inhibited)
++ {
++ return;
++ }
+ }
+ print_comment (&paren_target);
+ }
+diff -ur indent-2.2.9.orig/src/indent.h indent-2.2.9/src/indent.h
+--- indent-2.2.9.orig/src/indent.h 2002-11-10 13:02:48.000000000 -0800
++++ indent-2.2.9/src/indent.h 2006-08-01 16:13:37.000000000 -0700
+@@ -124,6 +122,8 @@
+
+ extern int break_line; /* Whether or not we should break the line. */
+
++extern BOOLEAN inhibited; /* Whether or not reformatting is currently disabled */
++
+ /* pointer to the token that lexi() has just found */
+ extern char *token;
+
+diff -ur indent-2.2.9.orig/src/output.c indent-2.2.9/src/output.c
+--- indent-2.2.9.orig/src/output.c 2002-12-12 09:36:49.000000000 -0800
++++ indent-2.2.9/src/output.c 2006-08-01 16:13:34.000000000 -0700
+@@ -24,7 +26,6 @@
+ RCSTAG_CC ("$Id: 2.2.9-indent-off-segfault.patch,v 1.1 2006/07/31 06:10:31 wormo Exp $");
+
+ static FILE * output = NULL;
+-static BOOLEAN inhibited = 0;
+ static buf_break_st_ty * buf_break_list = NULL;
+
+ /* Priority mask bits */
diff --git a/dev-util/indent/files/digest-indent-2.2.9-r3 b/dev-util/indent/files/digest-indent-2.2.9-r3
new file mode 100644
index 000000000000..8883569a3b05
--- /dev/null
+++ b/dev-util/indent/files/digest-indent-2.2.9-r3
@@ -0,0 +1,3 @@
+MD5 dcdbb163bef928306dee2a0cfc581c89 indent-2.2.9.tar.gz 678173
+RMD160 ed858ace1479236ce24725b42c8490095ce06ada indent-2.2.9.tar.gz 678173
+SHA256 0b9387bda5639ed54cf91bd607ab055624a07414f7f6882a75be97fd776ce466 indent-2.2.9.tar.gz 678173
diff --git a/dev-util/indent/indent-2.2.9-r3.ebuild b/dev-util/indent/indent-2.2.9-r3.ebuild
new file mode 100644
index 000000000000..5da3d335843a
--- /dev/null
+++ b/dev-util/indent/indent-2.2.9-r3.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-util/indent/indent-2.2.9-r3.ebuild,v 1.1 2006/07/31 06:10:31 wormo Exp $
+
+inherit eutils
+
+DESCRIPTION="Indent program source files"
+HOMEPAGE="http://www.gnu.org/software/indent/indent.html"
+SRC_URI="mirror://gnu/indent/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+IUSE="nls"
+
+DEPEND="virtual/libc"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/${PV}-deb-gentoo.patch
+ epatch "${FILESDIR}"/${PV}-malloc.patch
+ epatch "${FILESDIR}"/${PV}-indent-off-segfault.patch # #125648
+
+ # Update timestamp so it isn't regenerated #76610
+ touch -r man/Makefile.am man/texinfo2man.c
+}
+
+src_compile() {
+ econf $(use_enable nls) || die
+ emake || die "emake failed"
+}
+
+src_install() {
+ make DESTDIR="${D}" install || die "make install failed"
+ dodoc AUTHORS NEWS README*
+ dohtml "${D}"/usr/doc/indent/*
+ rm -r "${D}"/usr/doc
+}
diff --git a/dev-util/indent/metadata.xml b/dev-util/indent/metadata.xml
new file mode 100644
index 000000000000..a2187038c2fb
--- /dev/null
+++ b/dev-util/indent/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+</maintainer>
+<longdescription lang="en">
+Indent is the GNU indenting program. It is used to beautify C program source
+files.
+</longdescription>
+</pkgmetadata>