diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-11-18 18:38:22 +0000 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-11-18 18:38:22 +0000 |
commit | a5956e0a0daddcad648e0d8d8e5cb3e49e09bda7 (patch) | |
tree | 3d2e0a61f348a5299e73ca7c2b236156a8cc79b5 /app-portage/eclass-manpages | |
parent | 38f60b3ec9ff175535d9a056a76ae42931e61e21 (diff) |
gentoo resync : 18.11.2017
Diffstat (limited to 'app-portage/eclass-manpages')
-rw-r--r-- | app-portage/eclass-manpages/Manifest | 2 | ||||
-rw-r--r-- | app-portage/eclass-manpages/files/eclass-to-manpage.awk | 36 |
2 files changed, 34 insertions, 4 deletions
diff --git a/app-portage/eclass-manpages/Manifest b/app-portage/eclass-manpages/Manifest index 7eb7772c3531..4554564aadd4 100644 --- a/app-portage/eclass-manpages/Manifest +++ b/app-portage/eclass-manpages/Manifest @@ -1,4 +1,4 @@ -AUX eclass-to-manpage.awk 9812 SHA256 750d616d4cb53a28da2b125dcdaf6f664bed04f93557061dba314319c04e54c3 SHA512 af8901b21350c820ae206b5652394c4c859326791bc00af9a0baa3b9b7c72cd3068f20cff292f0707aec6aa9715477ca840df047c1bc033f48800e110d8bb51c WHIRLPOOL f088bd24d90f44cfec4530f7c59062373f05868c65da9b40051684c5eb6df817ee1269218dca0704a77f07a33fc37ba620cc64bcf0514d78d4b045b6c9fdeb72 +AUX eclass-to-manpage.awk 10908 SHA256 28e15040604275a91ec215105ea4490d7ff910d6d904324e37386b2ccc46c422 SHA512 b19f4ec59fb065ef334b19881a3e7d01cd4911d26da31acde96f87e36585973d7b9c67a71f4e6b376ed96d9506ab241fc99aa7f062377ff63768e3603f6c7d7b WHIRLPOOL 3ae9b41654c92c54e5e1554af1110e00ef2cdf9a44c585a1186f7dd7cbb161986b46e5c61a8f0db0bb8277fd591f3ef2f1a0cffcd1263f83fd79742e7301cf76 AUX eclass-to-manpage.sh 780 SHA256 27c19b79671cea217bd7d84e7f385a7d3cdf78411b6ce2f07303965d201c841b SHA512 266f15ac5d2efc42ce792d9e0c1d91e99502a5cd93ee1b915fe952cdd894bc4e773014c3f6731d2a11a2d82466676035cff21a1d88070fe85f1dca915dca203c WHIRLPOOL a9bafe48b6ba3fce7787cd6029adee73b1a08b06ebd114dfdfa9a1270a40e1190ff91fb21ccb6b9a3ef6063c3e9880445ba6daa8085551eb134b4658ec9fbf68 DIST eclass-manpages-20170321.tar.xz 459596 SHA256 47aaef9603822bf0a5e7f738b4f354c83bdcbb61b1639f66de02db24de2b4bc6 SHA512 7ff2a48659382ae84944e4f4cf4bb8a73d51355d8bcd63f16fa155e3da3010430babe6f7d977327e5c7f14f0b5e6a23ee5659665e35b020bcd7772008ce3b3b0 WHIRLPOOL 656cb2a0867b6f10a2bba59dd26ffc19c75d8e753d150d4fec90ffe7d586192e98fd44af5aafeb2fee1e0209a10c916ad0dc677a71a14ba4796dd1795d6acb17 DIST eclass-manpages-20170428.tar.xz 457936 SHA256 f1138d403ede694409c5cd584d1b7c1cd596e8714f092a84312cf19837240af6 SHA512 15f21b13aa66eb7fa9a02bcd4e33ec5f9eba9a82412184ba821ccfdccaa1e34d8161464ae9db939bc3e7df661eda45755efa4a465883c4577b406ca712aa2e01 WHIRLPOOL 10f688309fc299189b315b25a7f528b38b5bb5d8f35785d4d3dd0af46d2f7fcf7dd14bad693a57a9c0262c95412a5edf44d7ad1ca729df71cc7a12b005edf643 diff --git a/app-portage/eclass-manpages/files/eclass-to-manpage.awk b/app-portage/eclass-manpages/files/eclass-to-manpage.awk index 0b65162c04ec..b2f9afb0fa95 100644 --- a/app-portage/eclass-manpages/files/eclass-to-manpage.awk +++ b/app-portage/eclass-manpages/files/eclass-to-manpage.awk @@ -18,6 +18,7 @@ # <optional; description of how to report bugs; # default: tell people to use bugs.gentoo.org> # @VCSURL: <optional; url to vcs for this eclass; default: https://gitweb.gentoo.org/repo/gentoo.git/log/eclass/@ECLASS@> +# @SUPPORTED_EAPIS: <optional; space-separated list of EAPIs> # @BLURB: <required; short description> # @DESCRIPTION: # <optional; long description> @@ -36,8 +37,9 @@ # The format of function-specific variables: # @VARIABLE: foo +# [@USER_VARIABLE] (set in make.conf, not ebuilds) +# [@INTERNAL] (internal eclass use variable) # [@DEFAULT_UNSET] -# [@INTERNAL] # [@REQUIRED] # @DESCRIPTION: # <required; blurb about this variable> @@ -45,8 +47,11 @@ # The format of eclass variables: # @ECLASS-VARIABLE: foo +# [@PRE_INHERIT] (the variable must be set before inheriting the eclass) +# [@USER_VARIABLE] (set in make.conf, not ebuilds) +# [@OUTPUT_VARIABLE] (set by eclass, to be read in ebuilds) +# [@INTERNAL] (internal eclass use variable) # [@DEFAULT_UNSET] -# [@INTERNAL] # [@REQUIRED] # @DESCRIPTION: # <required; blurb about this variable> @@ -147,6 +152,7 @@ function handle_eclass() { eclass = $3 eclass_maintainer = "" eclass_author = "" + supported_eapis = "" blurb = "" desc = "" example = "" @@ -176,6 +182,8 @@ function handle_eclass() { reporting_bugs = eat_paragraph() if ($2 == "@VCSURL:") vcs_url = eat_line() + if ($2 == "@SUPPORTED_EAPIS:") + supported_eapis = eat_line() if ($2 == "@BLURB:") blurb = eat_line() if ($2 == "@DESCRIPTION:") @@ -275,6 +283,11 @@ function _handle_variable() { internal = 0 required = 0 + # additional variable classes + pre_inherit = 0 + user_variable = 0 + output_variable = 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) @@ -290,6 +303,12 @@ function _handle_variable() { internal = 1 else if ($2 == "@REQUIRED") required = 1 + else if ($2 == "@PRE_INHERIT") + pre_inherit = 1 + else if ($2 == "@USER_VARIABLE") + user_variable = 1 + else if ($2 == "@OUTPUT_VARIABLE") + output_variable = 1 else opts = 0 } @@ -307,7 +326,7 @@ function _handle_variable() { regex = "^[[:space:]]*:[[:space:]]*[$]{" var_name ":?=(.*)}" val = gensub(regex, "\\1", 1, $0) if (val == $0) { - if (default_unset + required + internal == 0) + if (default_unset + required + internal + output_variable == 0) warn(var_name ": unable to extract default variable content: " $0) val = "" } else if (val !~ /^["']/ && val ~ / /) { @@ -320,6 +339,17 @@ function _handle_variable() { val = " " op " \\fI" val "\\fR" if (required == 1) val = val " (REQUIRED)" + # TODO: group variables using those classes + if (pre_inherit == 1) + val = val " (SET BEFORE INHERIT)" + if (user_variable == 1) + val = val " (USER VARIABLE)" + if (output_variable == 1) + val = val " (GENERATED BY ECLASS)" + + # check for invalid combos + if (internal + pre_inherit + user_variable + output_variable > 1) + fail(var_name ": multiple variable classes specified") if (internal == 1) return "" |