summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2011-08-22 04:01:42 +0000
committerMike Frysinger <vapier@gentoo.org>2011-08-22 04:01:42 +0000
commitd72493eba5c7f4092179a54125abac0a2546dc66 (patch)
treeb1e9af5c4e1c6fd5de3d6b4016ea66151aeaea6f /app-portage
parentUse /usr/lib/debug as the separate debug dir since everything else atm assume... (diff)
downloadgentoo-2-d72493eba5c7f4092179a54125abac0a2546dc66.tar.gz
gentoo-2-d72493eba5c7f4092179a54125abac0a2546dc66.tar.bz2
gentoo-2-d72493eba5c7f4092179a54125abac0a2546dc66.zip
Add support for @AUTHOR block since people are going to cram it in there otherwise #375975 by Ralph Sennhauser.
(Portage version: 2.2.0_alpha51/cvs/Linux x86_64)
Diffstat (limited to 'app-portage')
-rw-r--r--app-portage/eclass-manpages/ChangeLog6
-rw-r--r--app-portage/eclass-manpages/files/eclass-to-manpage.awk19
2 files changed, 20 insertions, 5 deletions
diff --git a/app-portage/eclass-manpages/ChangeLog b/app-portage/eclass-manpages/ChangeLog
index 119b3fbf7cf8..266217fb1bb0 100644
--- a/app-portage/eclass-manpages/ChangeLog
+++ b/app-portage/eclass-manpages/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for app-portage/eclass-manpages
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-portage/eclass-manpages/ChangeLog,v 1.22 2011/07/20 03:11:05 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-portage/eclass-manpages/ChangeLog,v 1.23 2011/08/22 04:01:42 vapier Exp $
+
+ 22 Aug 2011; Mike Frysinger <vapier@gentoo.org> files/eclass-to-manpage.awk:
+ Add support for @AUTHOR block since people are going to cram it in there
+ otherwise #375975 by Ralph Sennhauser.
20 Jul 2011; Mike Frysinger <vapier@gentoo.org> files/eclass-to-manpage.awk:
Add @INTERNAL support #375545 by Ralph Sennhauser.
diff --git a/app-portage/eclass-manpages/files/eclass-to-manpage.awk b/app-portage/eclass-manpages/files/eclass-to-manpage.awk
index 5dd1990e71e0..54f38ac8b7f9 100644
--- a/app-portage/eclass-manpages/files/eclass-to-manpage.awk
+++ b/app-portage/eclass-manpages/files/eclass-to-manpage.awk
@@ -1,6 +1,6 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-portage/eclass-manpages/files/eclass-to-manpage.awk,v 1.22 2011/07/20 03:11:05 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-portage/eclass-manpages/files/eclass-to-manpage.awk,v 1.23 2011/08/22 04:01:42 vapier Exp $
# This awk converts the comment documentation found in eclasses
# into man pages for easier/nicer reading.
@@ -13,6 +13,8 @@
# @ECLASS: foo.eclass
# @MAINTAINER:
# <required; list of contacts, one per line>
+# @AUTHOR:
+# <optional; list of authors, one per line>
# @BLURB: <required; short description>
# @DESCRIPTION:
# <optional; long description>
@@ -101,6 +103,10 @@ function eat_paragraph() {
return ret
}
+function pre_text(p) {
+ return ".nf\n" p "\n.fi"
+}
+
function man_text(p) {
return gensub(/-/, "\\-", "g", p)
}
@@ -111,6 +117,7 @@ function man_text(p) {
function handle_eclass() {
eclass = $3
eclass_maintainer = ""
+ eclass_author = ""
blurb = ""
desc = ""
example = ""
@@ -130,6 +137,8 @@ function handle_eclass() {
getline
if ($2 == "@MAINTAINER:")
eclass_maintainer = eat_paragraph()
+ if ($2 == "@AUTHOR:")
+ eclass_author = eat_paragraph()
if ($2 == "@BLURB:")
blurb = eat_line()
if ($2 == "@DESCRIPTION:")
@@ -300,11 +309,13 @@ function handle_footer() {
print ".SH \"ECLASS VARIABLES\""
print man_text(eclass_variables)
}
- #print ".SH \"AUTHORS\""
- # hmm, how to handle ? someone will probably whine if we dont ...
+ if (eclass_author != "") {
+ print ".SH \"AUTHORS\""
+ print pre_text(man_text(eclass_author))
+ }
if (eclass_maintainer != "") {
print ".SH \"MAINTAINERS\""
- print man_text(eclass_maintainer)
+ print pre_text(man_text(eclass_maintainer))
}
print ".SH \"REPORTING BUGS\""
print "Please report bugs via http://bugs.gentoo.org/"