Add support for @AUTHOR block since people are going to cram it in there otherwise...
authorMike Frysinger <vapier@gentoo.org>
Mon, 22 Aug 2011 04:01:42 +0000 (04:01 +0000)
committerMike Frysinger <vapier@gentoo.org>
Mon, 22 Aug 2011 04:01:42 +0000 (04:01 +0000)
Package-Manager: portage-2.2.0_alpha51/cvs/Linux x86_64

app-portage/eclass-manpages/ChangeLog
app-portage/eclass-manpages/Manifest
app-portage/eclass-manpages/files/eclass-to-manpage.awk

index 119b3fbf7cf8256d40b55bf2f7d000257da778fa..266217fb1bb052c85164a1a15470056964f47d32 100644 (file)
@@ -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.
index 2d4e8a5a0fd5e2b92e605e4de52cb7e305433dc8..0e5afd0943d2233987c5c4d4c6db1a3197fd412b 100644 (file)
@@ -1,14 +1,14 @@
 -----BEGIN PGP SIGNED MESSAGE-----
 Hash: SHA256
 
-AUX eclass-to-manpage.awk 7933 RMD160 ff60920fd518c959dc39a8532085e93a04f68700 SHA1 a143ab6bfef120a2efd25019968d85eca73b3013 SHA256 8ecab027054951332c177a0209217892d0066baf8bb35679c7f8f0bb17574b0d
+AUX eclass-to-manpage.awk 8132 RMD160 225bb8b2bd2ab3199d6b8445f237877ba7c83e6e SHA1 c7610111a7508a0e1ce1ad287c34255d7c9ebee7 SHA256 e10642654cf7f7e1f9f76c2b692bdf446e234732db7264715437905fe1249600
 EBUILD eclass-manpages-20100821.ebuild 817 RMD160 d63cb4db8a6573c3ab312aefa060b01e31b032e8 SHA1 b3fea25208292fad5fe4bfbe1f30b70bd0b3bbee SHA256 1fe3f2214afe2f390270972c209e22a3a3948258cfe42cea4516a99740f0d72c
-MISC ChangeLog 3279 RMD160 36872255751b22df89390ccbb417f8ba18e98526 SHA1 e5008e8ce44550bf598e9aa8f13a975ff3f85a60 SHA256 9a8d0de7c84c115ddb1213fe642102bc43fc74630da7ed6da8074112eb2a861a
+MISC ChangeLog 3475 RMD160 bb43ac3cfbdacf9cc7f9b08feed4feb2276c146c SHA1 e3faffab3b904ec803fb324b85622bfdd870da89 SHA256 36e288c0e70ba10b3ceb3d833c656ee5bb59d7ee972d05a6d249a1ca17f7e496
 MISC metadata.xml 227 RMD160 e9d4b9c272d9395c188eb8ac590098a9cfee2b22 SHA1 ce478b95eb207bece7803c6970ea3f02eb471fdf SHA256 9daef2a3e592faedde6cab7914f5245c20b2ba43533ece96dfb84ea875cef96b
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.17 (GNU/Linux)
 
-iF4EAREIAAYFAk4mR1QACgkQaC/OocHi7JZHkQEAiMhabY0auWav3pa6lpKU8+dF
-bX98iOaTiaXCOys57nMA/30dFQ5KeK04VOFgqBxw5c0KOGOqjNM2wSjvHYTMwWqD
-=Y+lu
+iF4EAREIAAYFAk5R1KwACgkQaC/OocHi7JYaqgEAiVTF8NGrauk/h17NPajc5G6G
+UQ0B+NyGrRnVCiZgeNsBAI3qEJm6MMHaJ7AhVf9sCT5AsB8JYnC8vDIAQlHt6Gej
+=3wUs
 -----END PGP SIGNATURE-----
index 5dd1990e71e05e30984846ca945e7dc5480b9c96..54f38ac8b7f9b6498fc41d0e40b68f4d5a4824e7 100644 (file)
@@ -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/"