public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo-x86 commit in app-portage/eclass-manpages/files: eclass-to-manpage.awk
@ 2008-02-19  5:14 Mike Frysinger (vapier)
  0 siblings, 0 replies; 17+ messages in thread
From: Mike Frysinger (vapier) @ 2008-02-19  5:14 UTC (permalink / raw
  To: gentoo-commits

vapier      08/02/19 05:14:08

  Modified:             eclass-to-manpage.awk
  Log:
  Do not abort if @DESCRIPTION is not set #209665 by mren.
  (Portage version: 2.2_pre2)

Revision  Changes    Path
1.12                 app-portage/eclass-manpages/files/eclass-to-manpage.awk

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-portage/eclass-manpages/files/eclass-to-manpage.awk?rev=1.12&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-portage/eclass-manpages/files/eclass-to-manpage.awk?rev=1.12&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-portage/eclass-manpages/files/eclass-to-manpage.awk?r1=1.11&r2=1.12

Index: eclass-to-manpage.awk
===================================================================
RCS file: /var/cvsroot/gentoo-x86/app-portage/eclass-manpages/files/eclass-to-manpage.awk,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- eclass-to-manpage.awk	1 Sep 2007 21:31:39 -0000	1.11
+++ eclass-to-manpage.awk	19 Feb 2008 05:14:08 -0000	1.12
@@ -1,6 +1,6 @@
 # Copyright 1999-2007 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.11 2007/09/01 21:31:39 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-portage/eclass-manpages/files/eclass-to-manpage.awk,v 1.12 2008/02/19 05:14:08 vapier Exp $
 
 # This awk converts the comment documentation found in eclasses
 # into man pages for easier/nicer reading.
@@ -122,8 +122,10 @@
 	# finally display it
 	print ".SH \"NAME\""
 	print eclass " \\- " man_text(blurb)
-	print ".SH \"DESCRIPTION\""
-	print man_text(desc)
+	if (desc != "") {
+		print ".SH \"DESCRIPTION\""
+		print man_text(desc)
+	}
 	if (example != "") {
 		print ".SH \"EXAMPLE\""
 		print man_text(example)
@@ -132,8 +134,6 @@
 	# sanity checks
 	if (blurb == "")
 		fail(eclass ": no @BLURB found")
-	if (desc == "")
-		fail(eclass ": no @DESCRIPTION found")
 	if (eclass_maintainer == "")
 		warn(eclass ": no @MAINTAINER found")
 



-- 
gentoo-commits@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] 17+ messages in thread

* [gentoo-commits] gentoo-x86 commit in app-portage/eclass-manpages/files: eclass-to-manpage.awk
@ 2008-02-19  5:20 Mike Frysinger (vapier)
  0 siblings, 0 replies; 17+ messages in thread
From: Mike Frysinger (vapier) @ 2008-02-19  5:20 UTC (permalink / raw
  To: gentoo-commits

vapier      08/02/19 05:20:08

  Modified:             eclass-to-manpage.awk
  Log:
  Add a new "@DEAD" tag so we skip dead eclasses.
  (Portage version: 2.2_pre2)

Revision  Changes    Path
1.13                 app-portage/eclass-manpages/files/eclass-to-manpage.awk

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-portage/eclass-manpages/files/eclass-to-manpage.awk?rev=1.13&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-portage/eclass-manpages/files/eclass-to-manpage.awk?rev=1.13&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-portage/eclass-manpages/files/eclass-to-manpage.awk?r1=1.12&r2=1.13

Index: eclass-to-manpage.awk
===================================================================
RCS file: /var/cvsroot/gentoo-x86/app-portage/eclass-manpages/files/eclass-to-manpage.awk,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- eclass-to-manpage.awk	19 Feb 2008 05:14:08 -0000	1.12
+++ eclass-to-manpage.awk	19 Feb 2008 05:20:08 -0000	1.13
@@ -1,6 +1,6 @@
 # Copyright 1999-2007 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.12 2008/02/19 05:14:08 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-portage/eclass-manpages/files/eclass-to-manpage.awk,v 1.13 2008/02/19 05:20:08 vapier Exp $
 
 # This awk converts the comment documentation found in eclasses
 # into man pages for easier/nicer reading.
@@ -258,6 +258,9 @@
 		if ($0 ~ /^# @ECLASS:/) {
 			handle_eclass()
 			state = "funcvar"
+		} else if ($0 == "# @DEAD") {
+			eclass = "dead"
+			exit(0)
 		} else if ($0 ~ /^# @/)
 			warn("Unexpected tag in \"" state "\" state: " $0)
 	} else if (state == "funcvar") {



-- 
gentoo-commits@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] 17+ messages in thread

* [gentoo-commits] gentoo-x86 commit in app-portage/eclass-manpages/files: eclass-to-manpage.awk
@ 2008-02-19  5:22 Mike Frysinger (vapier)
  0 siblings, 0 replies; 17+ messages in thread
From: Mike Frysinger (vapier) @ 2008-02-19  5:22 UTC (permalink / raw
  To: gentoo-commits

vapier      08/02/19 05:22:39

  Modified:             eclass-to-manpage.awk
  Log:
  make sure we dont emit empty files for dead eclasses
  (Portage version: 2.2_pre2)

Revision  Changes    Path
1.14                 app-portage/eclass-manpages/files/eclass-to-manpage.awk

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-portage/eclass-manpages/files/eclass-to-manpage.awk?rev=1.14&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-portage/eclass-manpages/files/eclass-to-manpage.awk?rev=1.14&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-portage/eclass-manpages/files/eclass-to-manpage.awk?r1=1.13&r2=1.14

Index: eclass-to-manpage.awk
===================================================================
RCS file: /var/cvsroot/gentoo-x86/app-portage/eclass-manpages/files/eclass-to-manpage.awk,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- eclass-to-manpage.awk	19 Feb 2008 05:20:08 -0000	1.13
+++ eclass-to-manpage.awk	19 Feb 2008 05:22:38 -0000	1.14
@@ -1,6 +1,6 @@
 # Copyright 1999-2007 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.13 2008/02/19 05:20:08 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-portage/eclass-manpages/files/eclass-to-manpage.awk,v 1.14 2008/02/19 05:22:38 vapier Exp $
 
 # This awk converts the comment documentation found in eclasses
 # into man pages for easier/nicer reading.
@@ -260,7 +260,7 @@
 			state = "funcvar"
 		} else if ($0 == "# @DEAD") {
 			eclass = "dead"
-			exit(0)
+			exit(10)
 		} else if ($0 ~ /^# @/)
 			warn("Unexpected tag in \"" state "\" state: " $0)
 	} else if (state == "funcvar") {
@@ -281,6 +281,6 @@
 END {
 	if (eclass == "")
 		fail("eclass not documented yet (no @ECLASS found)");
-	else
+	else if (eclass != "dead")
 		handle_footer()
 }



-- 
gentoo-commits@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] 17+ messages in thread

* [gentoo-commits] gentoo-x86 commit in app-portage/eclass-manpages/files: eclass-to-manpage.awk
@ 2009-12-09 10:15 Mike Frysinger (vapier)
  0 siblings, 0 replies; 17+ messages in thread
From: Mike Frysinger (vapier) @ 2009-12-09 10:15 UTC (permalink / raw
  To: gentoo-commits

vapier      09/12/09 10:15:57

  Modified:             eclass-to-manpage.awk
  Log:
  Detect variables given default values via :${var:=val}.
  (Portage version: 2.2_rc55/cvs/Linux x86_64, RepoMan options: --force)

Revision  Changes    Path
1.15                 app-portage/eclass-manpages/files/eclass-to-manpage.awk

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-portage/eclass-manpages/files/eclass-to-manpage.awk?rev=1.15&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-portage/eclass-manpages/files/eclass-to-manpage.awk?rev=1.15&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-portage/eclass-manpages/files/eclass-to-manpage.awk?r1=1.14&r2=1.15

Index: eclass-to-manpage.awk
===================================================================
RCS file: /var/cvsroot/gentoo-x86/app-portage/eclass-manpages/files/eclass-to-manpage.awk,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- eclass-to-manpage.awk	19 Feb 2008 05:22:38 -0000	1.14
+++ eclass-to-manpage.awk	9 Dec 2009 10:15:57 -0000	1.15
@@ -1,6 +1,6 @@
 # Copyright 1999-2007 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.14 2008/02/19 05:22:38 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-portage/eclass-manpages/files/eclass-to-manpage.awk,v 1.15 2009/12/09 10:15:57 vapier Exp $
 
 # This awk converts the comment documentation found in eclasses
 # into man pages for easier/nicer reading.
@@ -192,14 +192,23 @@
 		desc = eat_paragraph()
 
 	# extract the default variable value
-	val = $0
-	regex = "^.*" var_name "="
-	sub(regex, "", val)
-	if ($0 == val) {
-		warn(var_name ": unable to extract default variable content: " $0)
-		val = ""
-	} else
-		val = " = \\fI" val "\\fR"
+	# first try var="val"
+	op = "="
+	regex = "^.*" var_name "=(.*)$"
+	val = gensub(regex, "\\1", "", $0)
+	if (val == $0) {
+		# next try : ${var:=val}
+		op = "?="
+		regex = "^[[:space:]]*:[[:space:]]*[$]{" var_name ":?=(.*)}"
+		val = gensub(regex, "\\1", "", $0)
+		if (val == $0) {
+			warn(var_name ": unable to extract default variable content: " $0)
+			val = ""
+		} else if (val !~ /^["']/ && val ~ / /)
+			val = "\"" val "\""
+	}
+	if (length(val))
+		val = " " op " \\fI" val "\\fR"
 
 	# now accumulate the stuff
 	ret = \






^ permalink raw reply	[flat|nested] 17+ messages in thread

* [gentoo-commits] gentoo-x86 commit in app-portage/eclass-manpages/files: eclass-to-manpage.awk
@ 2010-08-21 19:25 Mike Frysinger (vapier)
  0 siblings, 0 replies; 17+ messages in thread
From: Mike Frysinger (vapier) @ 2010-08-21 19:25 UTC (permalink / raw
  To: gentoo-commits

vapier      10/08/21 19:25:57

  Modified:             eclass-to-manpage.awk
  Log:
  add @DEFAULT_UNSET, @REQUIRED, and @INTERNAL for variables

Revision  Changes    Path
1.16                 app-portage/eclass-manpages/files/eclass-to-manpage.awk

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-portage/eclass-manpages/files/eclass-to-manpage.awk?rev=1.16&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-portage/eclass-manpages/files/eclass-to-manpage.awk?rev=1.16&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-portage/eclass-manpages/files/eclass-to-manpage.awk?r1=1.15&r2=1.16

Index: eclass-to-manpage.awk
===================================================================
RCS file: /var/cvsroot/gentoo-x86/app-portage/eclass-manpages/files/eclass-to-manpage.awk,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- eclass-to-manpage.awk	9 Dec 2009 10:15:57 -0000	1.15
+++ eclass-to-manpage.awk	21 Aug 2010 19:25:57 -0000	1.16
@@ -1,6 +1,6 @@
 # Copyright 1999-2007 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.15 2009/12/09 10:15:57 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-portage/eclass-manpages/files/eclass-to-manpage.awk,v 1.16 2010/08/21 19:25:57 vapier Exp $
 
 # This awk converts the comment documentation found in eclasses
 # into man pages for easier/nicer reading.
@@ -30,12 +30,18 @@
 
 # The format of function-specific variables:
 # @VARIABLE: foo
+# [@DEFAULT_UNSET]
+# [@INTERNAL]
+# [@REQUIRED]
 # @DESCRIPTION:
 # <required; blurb about this variable>
 # foo="<default value>"
 
 # The format of eclass variables:
 # @ECLASS-VARIABLE: foo
+# [@DEFAULT_UNSET]
+# [@INTERNAL]
+# [@REQUIRED]
 # @DESCRIPTION:
 # <required; blurb about this variable>
 # foo="<default value>"
@@ -46,8 +52,14 @@
 # code by using this marker at the start and end.
 # @CODE
 
-function _stderr_msg(text, type) {
-	print FILENAME ":" NR ":" type ": " text > "/dev/stderr"
+function _stderr_msg(text, type,   file, cnt) {
+	if (_stderr_header_done != 1) {
+		cnt = split(FILENAME, file, /\//)
+		print "\n" file[cnt] ":" > "/dev/stderr"
+		_stderr_header_done = 1
+	}
+
+	print "   " type ":" NR ": " text > "/dev/stderr"
 }
 function warn(text) {
 	_stderr_msg(text, "warning")
@@ -185,9 +197,23 @@
 	var_name = $3
 	desc = ""
 	val = ""
-
-	# grab the docs
-	getline
+	default_unset = 0
+	internal = 0
+	required = 0
+
+	# grab the optional attributes
+	opts = 1
+	while (opts) {
+		getline
+		if ($2 == "@DEFAULT_UNSET")
+			default_unset = 1
+		else if ($2 == "@INTERNAL")
+			internal = 1
+		else if ($2 == "@REQUIRED")
+			required = 1
+		else
+			opts = 0
+	}
 	if ($2 == "@DESCRIPTION:")
 		desc = eat_paragraph()
 
@@ -202,13 +228,22 @@
 		regex = "^[[:space:]]*:[[:space:]]*[$]{" var_name ":?=(.*)}"
 		val = gensub(regex, "\\1", "", $0)
 		if (val == $0) {
-			warn(var_name ": unable to extract default variable content: " $0)
+			if (default_unset + required + internal == 0)
+				warn(var_name ": unable to extract default variable content: " $0)
 			val = ""
-		} else if (val !~ /^["']/ && val ~ / /)
+		} else if (val !~ /^["']/ && val ~ / /) {
+			if (default_unset == 1)
+				warn(var_name ": marked as unset, but has value: " val)
 			val = "\"" val "\""
+		}
 	}
 	if (length(val))
 		val = " " op " \\fI" val "\\fR"
+	if (required == 1)
+		val = val " (REQUIRED)"
+
+	if (internal == 1)
+		return ""
 
 	# now accumulate the stuff
 	ret = \
@@ -222,12 +257,18 @@
 	return ret
 }
 function handle_variable() {
-	print _handle_variable()
+	ret = _handle_variable()
+	if (ret == "")
+		return
+	print ret
 }
 function handle_eclass_variable() {
+	ret = _handle_variable()
+	if (ret == "")
+		return
 	if (eclass_variables != "")
 		eclass_variables = eclass_variables "\n"
-	eclass_variables = eclass_variables _handle_variable()
+	eclass_variables = eclass_variables ret
 }
 
 #






^ permalink raw reply	[flat|nested] 17+ messages in thread

* [gentoo-commits] gentoo-x86 commit in app-portage/eclass-manpages/files: eclass-to-manpage.awk
@ 2010-08-22 23:10 Mike Frysinger (vapier)
  0 siblings, 0 replies; 17+ messages in thread
From: Mike Frysinger (vapier) @ 2010-08-22 23:10 UTC (permalink / raw
  To: gentoo-commits

vapier      10/08/22 23:10:55

  Modified:             eclass-to-manpage.awk
  Log:
  only dump FUNCTIONS section header when necessary
  (Portage version: 2.2_rc67/cvs/Linux x86_64)

Revision  Changes    Path
1.17                 app-portage/eclass-manpages/files/eclass-to-manpage.awk

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-portage/eclass-manpages/files/eclass-to-manpage.awk?rev=1.17&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-portage/eclass-manpages/files/eclass-to-manpage.awk?rev=1.17&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-portage/eclass-manpages/files/eclass-to-manpage.awk?r1=1.16&r2=1.17

Index: eclass-to-manpage.awk
===================================================================
RCS file: /var/cvsroot/gentoo-x86/app-portage/eclass-manpages/files/eclass-to-manpage.awk,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- eclass-to-manpage.awk	21 Aug 2010 19:25:57 -0000	1.16
+++ eclass-to-manpage.awk	22 Aug 2010 23:10:55 -0000	1.17
@@ -1,6 +1,6 @@
-# Copyright 1999-2007 Gentoo Foundation
+# Copyright 1999-2010 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.16 2010/08/21 19:25:57 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-portage/eclass-manpages/files/eclass-to-manpage.awk,v 1.17 2010/08/22 23:10:55 vapier Exp $
 
 # This awk converts the comment documentation found in eclasses
 # into man pages for easier/nicer reading.
@@ -148,13 +148,17 @@
 		fail(eclass ": no @BLURB found")
 	if (eclass_maintainer == "")
 		warn(eclass ": no @MAINTAINER found")
-
-	print ".SH \"FUNCTIONS\""
 }
 
 #
 # Handle a @FUNCTION block
 #
+function show_function_header() {
+	if (_function_header_done != 1) {
+		print ".SH \"FUNCTIONS\""
+		_function_header_done = 1
+	}
+}
 function handle_function() {
 	func_name = $3
 	usage = ""
@@ -162,6 +166,8 @@
 	maintainer = ""
 	desc = ""
 
+	show_function_header()
+
 	# grab the docs
 	getline
 	if ($2 == "@USAGE:")
@@ -257,6 +263,7 @@
 	return ret
 }
 function handle_variable() {
+	show_function_header()
 	ret = _handle_variable()
 	if (ret == "")
 		return






^ permalink raw reply	[flat|nested] 17+ messages in thread

* [gentoo-commits] gentoo-x86 commit in app-portage/eclass-manpages/files: eclass-to-manpage.awk
@ 2010-09-12  6:45 Mike Frysinger (vapier)
  0 siblings, 0 replies; 17+ messages in thread
From: Mike Frysinger (vapier) @ 2010-09-12  6:45 UTC (permalink / raw
  To: gentoo-commits

vapier      10/09/12 06:45:18

  Modified:             eclass-to-manpage.awk
  Log:
  handle trailing backslashes in @CODE blocks #335702 by Michał Górny
  (Portage version: 2.2_rc67/cvs/Linux x86_64)

Revision  Changes    Path
1.18                 app-portage/eclass-manpages/files/eclass-to-manpage.awk

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-portage/eclass-manpages/files/eclass-to-manpage.awk?rev=1.18&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-portage/eclass-manpages/files/eclass-to-manpage.awk?rev=1.18&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-portage/eclass-manpages/files/eclass-to-manpage.awk?r1=1.17&r2=1.18

Index: eclass-to-manpage.awk
===================================================================
RCS file: /var/cvsroot/gentoo-x86/app-portage/eclass-manpages/files/eclass-to-manpage.awk,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- eclass-to-manpage.awk	22 Aug 2010 23:10:55 -0000	1.17
+++ eclass-to-manpage.awk	12 Sep 2010 06:45:18 -0000	1.18
@@ -1,6 +1,6 @@
 # Copyright 1999-2010 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.17 2010/08/22 23:10:55 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-portage/eclass-manpages/files/eclass-to-manpage.awk,v 1.18 2010/09/12 06:45:18 vapier Exp $
 
 # This awk converts the comment documentation found in eclasses
 # into man pages for easier/nicer reading.
@@ -82,6 +82,10 @@
 	while ($0 ~ /^#([[:space:]]*$|[[:space:]][^@])/) {
 		sub(/^#[[:space:]]?/, "", $0)
 		ret = ret "\n" $0
+		# Handle the common case of trailing backslashes in
+		# code blocks to cross multiple lines #335702
+		if (code && $NF == "\\")
+			ret = ret "\\"
 		getline
 		if ($0 ~ /^# @CODE$/) {
 			if (code)






^ permalink raw reply	[flat|nested] 17+ messages in thread

* [gentoo-commits] gentoo-x86 commit in app-portage/eclass-manpages/files: eclass-to-manpage.awk
@ 2011-02-10  7:26 Ulrich Mueller (ulm)
  0 siblings, 0 replies; 17+ messages in thread
From: Ulrich Mueller (ulm) @ 2011-02-10  7:26 UTC (permalink / raw
  To: gentoo-commits

ulm         11/02/10 07:26:07

  Modified:             eclass-to-manpage.awk
  Log:
  Add UTF-8 coding tag, bug 244499.
  
  (Portage version: 2.1.9.39/cvs/Linux x86_64)

Revision  Changes    Path
1.19                 app-portage/eclass-manpages/files/eclass-to-manpage.awk

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-portage/eclass-manpages/files/eclass-to-manpage.awk?rev=1.19&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-portage/eclass-manpages/files/eclass-to-manpage.awk?rev=1.19&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-portage/eclass-manpages/files/eclass-to-manpage.awk?r1=1.18&r2=1.19

Index: eclass-to-manpage.awk
===================================================================
RCS file: /var/cvsroot/gentoo-x86/app-portage/eclass-manpages/files/eclass-to-manpage.awk,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- eclass-to-manpage.awk	12 Sep 2010 06:45:18 -0000	1.18
+++ eclass-to-manpage.awk	10 Feb 2011 07:26:07 -0000	1.19
@@ -1,6 +1,6 @@
-# Copyright 1999-2010 Gentoo Foundation
+# 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.18 2010/09/12 06:45:18 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-portage/eclass-manpages/files/eclass-to-manpage.awk,v 1.19 2011/02/10 07:26:07 ulm Exp $
 
 # This awk converts the comment documentation found in eclasses
 # into man pages for easier/nicer reading.
@@ -115,6 +115,7 @@
 	example = ""
 
 	# first the man page header
+	print ".\\\" -*- coding: utf-8 -*-"
 	print ".\\\" ### DO NOT EDIT THIS FILE"
 	print ".\\\" ### This man page is autogenerated by eclass-to-manpage.awk"
 	print ".\\\" ### based on comments found in " eclass






^ permalink raw reply	[flat|nested] 17+ messages in thread

* [gentoo-commits] gentoo-x86 commit in app-portage/eclass-manpages/files: eclass-to-manpage.awk
@ 2011-07-20  2:56 Mike Frysinger (vapier)
  0 siblings, 0 replies; 17+ messages in thread
From: Mike Frysinger (vapier) @ 2011-07-20  2:56 UTC (permalink / raw
  To: gentoo-commits

vapier      11/07/20 02:56:01

  Modified:             eclass-to-manpage.awk
  Log:
  get PORTDIR from build env

Revision  Changes    Path
1.20                 app-portage/eclass-manpages/files/eclass-to-manpage.awk

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-portage/eclass-manpages/files/eclass-to-manpage.awk?rev=1.20&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-portage/eclass-manpages/files/eclass-to-manpage.awk?rev=1.20&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-portage/eclass-manpages/files/eclass-to-manpage.awk?r1=1.19&r2=1.20

Index: eclass-to-manpage.awk
===================================================================
RCS file: /var/cvsroot/gentoo-x86/app-portage/eclass-manpages/files/eclass-to-manpage.awk,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- eclass-to-manpage.awk	10 Feb 2011 07:26:07 -0000	1.19
+++ eclass-to-manpage.awk	20 Jul 2011 02:56:01 -0000	1.20
@@ -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.19 2011/02/10 07:26:07 ulm Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-portage/eclass-manpages/files/eclass-to-manpage.awk,v 1.20 2011/07/20 02:56:01 vapier Exp $
 
 # This awk converts the comment documentation found in eclasses
 # into man pages for easier/nicer reading.
@@ -300,7 +300,7 @@
 	print ".SH \"REPORTING BUGS\""
 	print "Please report bugs via http://bugs.gentoo.org/"
 	print ".SH \"FILES\""
-	print ".BR /usr/portage/eclass/" eclass
+	print ".BR " eclassdir "/" eclass
 	print ".SH \"SEE ALSO\""
 	print ".BR ebuild (5)"
 }
@@ -310,6 +310,9 @@
 #
 BEGIN {
 	state = "header"
+	if (PORTDIR == "")
+		PORTDIR = "/usr/portage"
+	eclassdir = PORTDIR "/eclass"
 }
 
 #






^ permalink raw reply	[flat|nested] 17+ messages in thread

* [gentoo-commits] gentoo-x86 commit in app-portage/eclass-manpages/files: eclass-to-manpage.awk
@ 2011-07-20  2:59 Mike Frysinger (vapier)
  0 siblings, 0 replies; 17+ messages in thread
From: Mike Frysinger (vapier) @ 2011-07-20  2:59 UTC (permalink / raw
  To: gentoo-commits

vapier      11/07/20 02:59:04

  Modified:             eclass-to-manpage.awk
  Log:
  detect java tags and error out early to avoid excess warnings/errors

Revision  Changes    Path
1.21                 app-portage/eclass-manpages/files/eclass-to-manpage.awk

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-portage/eclass-manpages/files/eclass-to-manpage.awk?rev=1.21&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-portage/eclass-manpages/files/eclass-to-manpage.awk?rev=1.21&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-portage/eclass-manpages/files/eclass-to-manpage.awk?r1=1.20&r2=1.21

Index: eclass-to-manpage.awk
===================================================================
RCS file: /var/cvsroot/gentoo-x86/app-portage/eclass-manpages/files/eclass-to-manpage.awk,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- eclass-to-manpage.awk	20 Jul 2011 02:56:01 -0000	1.20
+++ eclass-to-manpage.awk	20 Jul 2011 02:59:04 -0000	1.21
@@ -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.20 2011/07/20 02:56:01 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-portage/eclass-manpages/files/eclass-to-manpage.awk,v 1.21 2011/07/20 02:59:04 vapier Exp $
 
 # This awk converts the comment documentation found in eclasses
 # into man pages for easier/nicer reading.
@@ -326,6 +326,8 @@
 		} else if ($0 == "# @DEAD") {
 			eclass = "dead"
 			exit(10)
+		} else if ($0 == "# @eclass-begin") {
+			fail("java documentation not supported")
 		} else if ($0 ~ /^# @/)
 			warn("Unexpected tag in \"" state "\" state: " $0)
 	} else if (state == "funcvar") {
@@ -345,7 +347,7 @@
 #
 END {
 	if (eclass == "")
-		fail("eclass not documented yet (no @ECLASS found)");
+		fail("eclass not documented yet (no @ECLASS found)")
 	else if (eclass != "dead")
 		handle_footer()
 }






^ permalink raw reply	[flat|nested] 17+ messages in thread

* [gentoo-commits] gentoo-x86 commit in app-portage/eclass-manpages/files: eclass-to-manpage.awk
@ 2011-07-20  3:11 Mike Frysinger (vapier)
  0 siblings, 0 replies; 17+ messages in thread
From: Mike Frysinger (vapier) @ 2011-07-20  3:11 UTC (permalink / raw
  To: gentoo-commits

vapier      11/07/20 03:11:05

  Modified:             eclass-to-manpage.awk
  Log:
  Add @INTERNAL support #375545 by Ralph Sennhauser.
  
  (Portage version: 2.2.0_alpha45/cvs/Linux x86_64)

Revision  Changes    Path
1.22                 app-portage/eclass-manpages/files/eclass-to-manpage.awk

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-portage/eclass-manpages/files/eclass-to-manpage.awk?rev=1.22&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-portage/eclass-manpages/files/eclass-to-manpage.awk?rev=1.22&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-portage/eclass-manpages/files/eclass-to-manpage.awk?r1=1.21&r2=1.22

Index: eclass-to-manpage.awk
===================================================================
RCS file: /var/cvsroot/gentoo-x86/app-portage/eclass-manpages/files/eclass-to-manpage.awk,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- eclass-to-manpage.awk	20 Jul 2011 02:59:04 -0000	1.21
+++ eclass-to-manpage.awk	20 Jul 2011 03:11:05 -0000	1.22
@@ -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.21 2011/07/20 02:59:04 vapier Exp $
+# $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 $
 
 # This awk converts the comment documentation found in eclasses
 # into man pages for easier/nicer reading.
@@ -25,6 +25,7 @@
 # @RETURN: <whatever foo returns>
 # @MAINTAINER:
 # <optional; list of contacts, one per line>
+# [@INTERNAL]
 # @DESCRIPTION:
 # <required if no @RETURN; blurb about this function>
 
@@ -169,10 +170,9 @@
 	usage = ""
 	funcret = ""
 	maintainer = ""
+	internal = 0
 	desc = ""
 
-	show_function_header()
-
 	# grab the docs
 	getline
 	if ($2 == "@USAGE:")
@@ -181,9 +181,18 @@
 		funcret = eat_line()
 	if ($2 == "@MAINTAINER:")
 		maintainer = eat_paragraph()
+	if ($2 == "@INTERNAL") {
+		internal = 1
+		getline
+	}
 	if ($2 == "@DESCRIPTION:")
 		desc = eat_paragraph()
 
+	if (internal == 1)
+		return
+
+	show_function_header()
+
 	# now print out the stuff
 	print ".TP"
 	print "\\fB" func_name "\\fR " man_text(usage)






^ permalink raw reply	[flat|nested] 17+ messages in thread

* [gentoo-commits] gentoo-x86 commit in app-portage/eclass-manpages/files: eclass-to-manpage.awk
@ 2011-08-22  4:01 Mike Frysinger (vapier)
  0 siblings, 0 replies; 17+ messages in thread
From: Mike Frysinger (vapier) @ 2011-08-22  4:01 UTC (permalink / raw
  To: gentoo-commits

vapier      11/08/22 04:01:42

  Modified:             eclass-to-manpage.awk
  Log:
  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)

Revision  Changes    Path
1.23                 app-portage/eclass-manpages/files/eclass-to-manpage.awk

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-portage/eclass-manpages/files/eclass-to-manpage.awk?rev=1.23&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-portage/eclass-manpages/files/eclass-to-manpage.awk?rev=1.23&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-portage/eclass-manpages/files/eclass-to-manpage.awk?r1=1.22&r2=1.23

Index: eclass-to-manpage.awk
===================================================================
RCS file: /var/cvsroot/gentoo-x86/app-portage/eclass-manpages/files/eclass-to-manpage.awk,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- eclass-to-manpage.awk	20 Jul 2011 03:11:05 -0000	1.22
+++ eclass-to-manpage.awk	22 Aug 2011 04:01:42 -0000	1.23
@@ -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 @@
 	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 handle_eclass() {
 	eclass = $3
 	eclass_maintainer = ""
+	eclass_author = ""
 	blurb = ""
 	desc = ""
 	example = ""
@@ -130,6 +137,8 @@
 	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 @@
 		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/"






^ permalink raw reply	[flat|nested] 17+ messages in thread

* [gentoo-commits] gentoo-x86 commit in app-portage/eclass-manpages/files: eclass-to-manpage.awk
@ 2011-08-22  4:49 Mike Frysinger (vapier)
  0 siblings, 0 replies; 17+ messages in thread
From: Mike Frysinger (vapier) @ 2011-08-22  4:49 UTC (permalink / raw
  To: gentoo-commits

vapier      11/08/22 04:49:21

  Modified:             eclass-to-manpage.awk
  Log:
  Add sources.g.o url to SEE ALSO.
  
  (Portage version: 2.2.0_alpha51/cvs/Linux x86_64)

Revision  Changes    Path
1.24                 app-portage/eclass-manpages/files/eclass-to-manpage.awk

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-portage/eclass-manpages/files/eclass-to-manpage.awk?rev=1.24&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-portage/eclass-manpages/files/eclass-to-manpage.awk?rev=1.24&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-portage/eclass-manpages/files/eclass-to-manpage.awk?r1=1.23&r2=1.24

Index: eclass-to-manpage.awk
===================================================================
RCS file: /var/cvsroot/gentoo-x86/app-portage/eclass-manpages/files/eclass-to-manpage.awk,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- eclass-to-manpage.awk	22 Aug 2011 04:01:42 -0000	1.23
+++ eclass-to-manpage.awk	22 Aug 2011 04:49:21 -0000	1.24
@@ -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.23 2011/08/22 04:01:42 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-portage/eclass-manpages/files/eclass-to-manpage.awk,v 1.24 2011/08/22 04:49:21 vapier Exp $
 
 # This awk converts the comment documentation found in eclasses
 # into man pages for easier/nicer reading.
@@ -323,6 +323,7 @@
 	print ".BR " eclassdir "/" eclass
 	print ".SH \"SEE ALSO\""
 	print ".BR ebuild (5)"
+	print pre_text("http://sources.gentoo.org/eclass/" eclass "?view=log")
 }
 
 #






^ permalink raw reply	[flat|nested] 17+ messages in thread

* [gentoo-commits] gentoo-x86 commit in app-portage/eclass-manpages/files: eclass-to-manpage.awk
@ 2011-11-24  0:05 Mike Frysinger (vapier)
  0 siblings, 0 replies; 17+ messages in thread
From: Mike Frysinger (vapier) @ 2011-11-24  0:05 UTC (permalink / raw
  To: gentoo-commits

vapier      11/11/24 00:05:41

  Modified:             eclass-to-manpage.awk
  Log:
  Add checks for duplicate func/var documentation (copy & paste).
  
  (Portage version: 2.2.0_alpha75/cvs/Linux x86_64)

Revision  Changes    Path
1.25                 app-portage/eclass-manpages/files/eclass-to-manpage.awk

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-portage/eclass-manpages/files/eclass-to-manpage.awk?rev=1.25&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-portage/eclass-manpages/files/eclass-to-manpage.awk?rev=1.25&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-portage/eclass-manpages/files/eclass-to-manpage.awk?r1=1.24&r2=1.25

Index: eclass-to-manpage.awk
===================================================================
RCS file: /var/cvsroot/gentoo-x86/app-portage/eclass-manpages/files/eclass-to-manpage.awk,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- eclass-to-manpage.awk	22 Aug 2011 04:49:21 -0000	1.24
+++ eclass-to-manpage.awk	24 Nov 2011 00:05:41 -0000	1.25
@@ -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.24 2011/08/22 04:49:21 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-portage/eclass-manpages/files/eclass-to-manpage.awk,v 1.25 2011/11/24 00:05:41 vapier Exp $
 
 # This awk converts the comment documentation found in eclasses
 # into man pages for easier/nicer reading.
@@ -182,6 +182,11 @@
 	internal = 0
 	desc = ""
 
+	# make sure people haven't specified this before (copy & paste error)
+	if (all_funcs[func_name])
+		fail(eclass ": duplicate definition found for function: " func_name)
+	all_funcs[func_name] = func_name
+
 	# grab the docs
 	getline
 	if ($2 == "@USAGE:")
@@ -230,6 +235,11 @@
 	internal = 0
 	required = 0
 
+	# make sure people haven't specified this before (copy & paste error)
+	if (all_vars[var_name])
+		fail(eclass ": duplicate definition found for variable: " var_name)
+	all_vars[var_name] = var_name
+
 	# grab the optional attributes
 	opts = 1
 	while (opts) {






^ permalink raw reply	[flat|nested] 17+ messages in thread

* [gentoo-commits] gentoo-x86 commit in app-portage/eclass-manpages/files: eclass-to-manpage.awk
@ 2012-07-18 14:24 Mike Frysinger (vapier)
  0 siblings, 0 replies; 17+ messages in thread
From: Mike Frysinger (vapier) @ 2012-07-18 14:24 UTC (permalink / raw
  To: gentoo-commits

vapier      12/07/18 14:24:06

  Modified:             eclass-to-manpage.awk
  Log:
  Error out when we hit an unknown keyword in an @ECLASS block.

Revision  Changes    Path
1.26                 app-portage/eclass-manpages/files/eclass-to-manpage.awk

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-portage/eclass-manpages/files/eclass-to-manpage.awk?rev=1.26&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-portage/eclass-manpages/files/eclass-to-manpage.awk?rev=1.26&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-portage/eclass-manpages/files/eclass-to-manpage.awk?r1=1.25&r2=1.26

Index: eclass-to-manpage.awk
===================================================================
RCS file: /var/cvsroot/gentoo-x86/app-portage/eclass-manpages/files/eclass-to-manpage.awk,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- eclass-to-manpage.awk	24 Nov 2011 00:05:41 -0000	1.25
+++ eclass-to-manpage.awk	18 Jul 2012 14:24:06 -0000	1.26
@@ -1,6 +1,6 @@
-# Copyright 1999-2011 Gentoo Foundation
+# Copyright 1999-2012 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.25 2011/11/24 00:05:41 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-portage/eclass-manpages/files/eclass-to-manpage.awk,v 1.26 2012/07/18 14:24:06 vapier Exp $
 
 # This awk converts the comment documentation found in eclasses
 # into man pages for easier/nicer reading.
@@ -145,6 +145,9 @@
 		desc = eat_paragraph()
 	if ($2 == "@EXAMPLE:")
 		example = eat_paragraph()
+	# in case they typo-ed the keyword, bail now
+	if ($2 ~ /^@/)
+		fail(eclass ": unknown keyword " $2)
 
 	# finally display it
 	print ".SH \"NAME\""






^ permalink raw reply	[flat|nested] 17+ messages in thread

* [gentoo-commits] gentoo-x86 commit in app-portage/eclass-manpages/files: eclass-to-manpage.awk
@ 2012-07-18 14:27 Mike Frysinger (vapier)
  0 siblings, 0 replies; 17+ messages in thread
From: Mike Frysinger (vapier) @ 2012-07-18 14:27 UTC (permalink / raw
  To: gentoo-commits

vapier      12/07/18 14:27:54

  Modified:             eclass-to-manpage.awk
  Log:
  Add support for @ROFF (idea from Ulrich Müller), and escape any leading . chars in comments to avoid mangling of the content #420153 by Michał Górny.
  
  (Portage version: 2.2.0_alpha116/cvs/Linux x86_64, RepoMan options: --force)

Revision  Changes    Path
1.27                 app-portage/eclass-manpages/files/eclass-to-manpage.awk

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-portage/eclass-manpages/files/eclass-to-manpage.awk?rev=1.27&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-portage/eclass-manpages/files/eclass-to-manpage.awk?rev=1.27&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-portage/eclass-manpages/files/eclass-to-manpage.awk?r1=1.26&r2=1.27

Index: eclass-to-manpage.awk
===================================================================
RCS file: /var/cvsroot/gentoo-x86/app-portage/eclass-manpages/files/eclass-to-manpage.awk,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- eclass-to-manpage.awk	18 Jul 2012 14:24:06 -0000	1.26
+++ eclass-to-manpage.awk	18 Jul 2012 14:27:54 -0000	1.27
@@ -1,6 +1,6 @@
 # Copyright 1999-2012 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.26 2012/07/18 14:24:06 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-portage/eclass-manpages/files/eclass-to-manpage.awk,v 1.27 2012/07/18 14:27:54 vapier Exp $
 
 # This awk converts the comment documentation found in eclasses
 # into man pages for easier/nicer reading.
@@ -54,6 +54,10 @@
 # In multiline paragraphs, you can create chunks of unformatted
 # code by using this marker at the start and end.
 # @CODE
+#
+# @ROFF <some roff macros>
+# If you want a little more manual control over the formatting, you can
+# insert roff macros directly into the output by using the @ROFF escape.
 
 function _stderr_msg(text, type,   file, cnt) {
 	if (_stderr_header_done != 1) {
@@ -82,22 +86,37 @@
 	code = 0
 	ret = ""
 	getline
-	while ($0 ~ /^#([[:space:]]*$|[[:space:]][^@])/) {
+	while ($0 ~ /^#/) {
+		# Only allow certain tokens in the middle of paragraphs
+		if ($2 ~ /^@/ && $2 !~ /^@(CODE|ROFF)$/)
+			break
+
 		sub(/^#[[:space:]]?/, "", $0)
+
+		# Escape . at start of line #420153
+		if ($0 ~ /^[.]/)
+			$0 = "\\&" $0
+
+		# Translate @CODE into @ROFF
+		if ($1 == "@CODE" && NF == 1) {
+			if (code)
+				$0 = "@ROFF .fi"
+			else
+				$0 = "@ROFF .nf"
+			code = !code
+		}
+
+		# Allow people to specify *roff commands directly
+		if ($1 == "@ROFF")
+			sub(/^@ROFF[[:space:]]*/, "", $0)
+
 		ret = ret "\n" $0
+
 		# Handle the common case of trailing backslashes in
 		# code blocks to cross multiple lines #335702
 		if (code && $NF == "\\")
 			ret = ret "\\"
 		getline
-		if ($0 ~ /^# @CODE$/) {
-			if (code)
-				ret = ret "\n.fi"
-			else
-				ret = ret "\n.nf"
-			code = !code
-			getline
-		}
 	}
 	sub(/^\n/,"",ret)
 	return ret






^ permalink raw reply	[flat|nested] 17+ messages in thread

* [gentoo-commits] gentoo-x86 commit in app-portage/eclass-manpages/files: eclass-to-manpage.awk
@ 2013-01-10 17:42 Mike Frysinger (vapier)
  0 siblings, 0 replies; 17+ messages in thread
From: Mike Frysinger (vapier) @ 2013-01-10 17:42 UTC (permalink / raw
  To: gentoo-commits

vapier      13/01/10 17:42:39

  Modified:             eclass-to-manpage.awk
  Log:
  Add optional @BUGREPORTS and @VCSURL fields so people can point their eclasses in their overlays to their own trackers.
  
  (Portage version: 2.2.0_alpha144/cvs/Linux x86_64, signed Manifest commit with key FB7C4156)

Revision  Changes    Path
1.28                 app-portage/eclass-manpages/files/eclass-to-manpage.awk

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-portage/eclass-manpages/files/eclass-to-manpage.awk?rev=1.28&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-portage/eclass-manpages/files/eclass-to-manpage.awk?rev=1.28&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-portage/eclass-manpages/files/eclass-to-manpage.awk?r1=1.27&r2=1.28

Index: eclass-to-manpage.awk
===================================================================
RCS file: /var/cvsroot/gentoo-x86/app-portage/eclass-manpages/files/eclass-to-manpage.awk,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- eclass-to-manpage.awk	18 Jul 2012 14:27:54 -0000	1.27
+++ eclass-to-manpage.awk	10 Jan 2013 17:42:39 -0000	1.28
@@ -1,6 +1,6 @@
-# Copyright 1999-2012 Gentoo Foundation
+# Copyright 1999-2013 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.27 2012/07/18 14:27:54 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-portage/eclass-manpages/files/eclass-to-manpage.awk,v 1.28 2013/01/10 17:42:39 vapier Exp $
 
 # This awk converts the comment documentation found in eclasses
 # into man pages for easier/nicer reading.
@@ -8,13 +8,17 @@
 # If you wish to have multiple paragraphs in a description, then
 # create empty comment lines.  Paragraph parsing ends when the comment
 # block does.
-#
+
 # The format of the eclass description:
 # @ECLASS: foo.eclass
 # @MAINTAINER:
 # <required; list of contacts, one per line>
 # @AUTHOR:
 # <optional; list of authors, one per line>
+# @BUGREPORTS:
+# <optional; description of how to report bugs;
+#  default: tell people to use bugs.gentoo.org>
+# @VCSURL: <optional; url to vcs for this eclass; default: http://sources.gentoo.org/eclass/@ECLASS@?view=log>
 # @BLURB: <required; short description>
 # @DESCRIPTION:
 # <optional; long description>
@@ -158,6 +162,10 @@
 		eclass_maintainer = eat_paragraph()
 	if ($2 == "@AUTHOR:")
 		eclass_author = eat_paragraph()
+	if ($2 == "@BUGREPORTS:")
+		reporting_bugs = eat_paragraph()
+	if ($2 == "@VCSURL:")
+		vcs_url = eat_line()
 	if ($2 == "@BLURB:")
 		blurb = eat_line()
 	if ($2 == "@DESCRIPTION:")
@@ -350,12 +358,12 @@
 		print pre_text(man_text(eclass_maintainer))
 	}
 	print ".SH \"REPORTING BUGS\""
-	print "Please report bugs via http://bugs.gentoo.org/"
+	print reporting_bugs
 	print ".SH \"FILES\""
 	print ".BR " eclassdir "/" eclass
 	print ".SH \"SEE ALSO\""
 	print ".BR ebuild (5)"
-	print pre_text("http://sources.gentoo.org/eclass/" eclass "?view=log")
+	print pre_text(gensub("@ECLASS@", eclass, "", vcs_url))
 }
 
 #
@@ -366,6 +374,8 @@
 	if (PORTDIR == "")
 		PORTDIR = "/usr/portage"
 	eclassdir = PORTDIR "/eclass"
+	reporting_bugs = "Please report bugs via http://bugs.gentoo.org/"
+	vcs_url = "http://sources.gentoo.org/eclass/@ECLASS@?view=log"
 }
 
 #





^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2013-01-10 17:42 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-22  4:49 [gentoo-commits] gentoo-x86 commit in app-portage/eclass-manpages/files: eclass-to-manpage.awk Mike Frysinger (vapier)
  -- strict thread matches above, loose matches on Subject: below --
2013-01-10 17:42 Mike Frysinger (vapier)
2012-07-18 14:27 Mike Frysinger (vapier)
2012-07-18 14:24 Mike Frysinger (vapier)
2011-11-24  0:05 Mike Frysinger (vapier)
2011-08-22  4:01 Mike Frysinger (vapier)
2011-07-20  3:11 Mike Frysinger (vapier)
2011-07-20  2:59 Mike Frysinger (vapier)
2011-07-20  2:56 Mike Frysinger (vapier)
2011-02-10  7:26 Ulrich Mueller (ulm)
2010-09-12  6:45 Mike Frysinger (vapier)
2010-08-22 23:10 Mike Frysinger (vapier)
2010-08-21 19:25 Mike Frysinger (vapier)
2009-12-09 10:15 Mike Frysinger (vapier)
2008-02-19  5:22 Mike Frysinger (vapier)
2008-02-19  5:20 Mike Frysinger (vapier)
2008-02-19  5:14 Mike Frysinger (vapier)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox