[packages/adapter: 628/631] Revert "separater parameters and locals"
glen
glen at pld-linux.org
Mon Sep 12 20:27:04 CEST 2016
commit c1974ca15900b154055394059f5905615ea3bc18
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Mon Aug 22 22:09:41 2016 +0300
Revert "separater parameters and locals"
gawk doesn't actually like such comments
This reverts commit ab517c2dbad11b5bc0a9604761f2165e94a71b50.
adapter.awk | 40 ++++++++++++++--------------------------
1 file changed, 14 insertions(+), 26 deletions(-)
---
diff --git a/adapter.awk b/adapter.awk
index f7f7f38..703f11a 100644
--- a/adapter.awk
+++ b/adapter.awk
@@ -81,8 +81,7 @@ function mktemp(template, tmp) {
return tmp
}
-function b_makekey(a, b, # parameters
- s) { # locals
+function b_makekey(a, b, s) {
s = a "" b
# kill bcond
gsub(/[#%]+{[!?]+[_a-zA-Z0-9]+:/, "", s)
@@ -1091,8 +1090,7 @@ END {
}
# substitutes fixed strings (not regexps)
-function fixedsub(s1,s2,t, # parameters
- ind) { # locals
+function fixedsub(s1,s2,t, ind) {
if (ind = index(t,s1))
t = substr(t, 1, ind-1) s2 substr(t, ind+length(s1))
return t
@@ -1515,8 +1513,7 @@ function use_macros()
}
}
-function format_configure(line, # parameters
- n, a, s) { # locals
+function format_configure(line, n, a, s) {
n = split(line, a, / /)
s = a[1] " \\\n"
for (i = 2; i <= n; i++) {
@@ -1528,8 +1525,7 @@ function format_configure(line, # parameters
# insertion sort of A[1..n]
# copied from mawk manual
-function isort(A,n, # parameters
- i,j,hold) { # locals
+function isort(A,n, i,j,hold) {
for (i = 2; i <= n; i++) {
hold = A[j = i]
while (A[j-1] > hold) {
@@ -1540,9 +1536,9 @@ function isort(A,n, # parameters
# sentinel A[0] = "" will be created if needed
}
-function use_files_macros( # no parameters
- i, n, t, a, l) { # locals
+function use_files_macros( i, n, t, a, l)
+{
use_macros()
# skip comments
@@ -1895,8 +1891,7 @@ function kill_preamble_macros()
}
}
-function get_epoch(pkg, ver, # parameters
- epoch) # locals
+function get_epoch(pkg, ver, epoch)
{
return
# should parse the BR lines more adequately:
@@ -1908,8 +1903,7 @@ function get_epoch(pkg, ver, # parameters
return epoch
}
-function format_requires(tag, value, # parameters
- n, p, i, deps, ndeps) { # locals
+function format_requires(tag, value, n, p, i, deps, ndeps) {
# skip any formatting for commented out items or some weird macros
if (/^#/ || /%\(/) {
return tag "\t" value
@@ -1950,8 +1944,7 @@ function add_br(br)
# {{{ Load rpm macros
# you should update the list also in adapter when making changes here
-function import_rpm_macros( # no parameters
- v) { # locals
+function import_rpm_macros( v) {
# File with rpm groups
topdir = ENVIRON["_topdir"]
@@ -2030,8 +2023,7 @@ function import_rpm_macros( # no parameters
# }}}
# {{{ replace opam names (caml)
-function replace_opam_deps(field, # paramters
- name) { # locals
+function replace_opam_deps(field, name) {
name = $2
if (name ~ "^(cryptokit|extlib|xmlm)$") {
name = "ocaml-" name
@@ -2173,8 +2165,7 @@ function replace_groupnames(group) {
# }}}
# {{{ replace_pkgconfig(pkg)
-function replace_pkgconfig(pkg, # parameters
- cmd, path, n, i, line) { # locals
+function replace_pkgconfig(pkg, cmd, path, n, i, line) {
n = split("/usr/lib64/pkgconfig /usr/lib/pkgconfig /usr/share/pkgconfig", path, / /)
for (i = 1; i <= n; i++) {
cmd = "rpm -qf --qf '%{N}' " path[i] "/" pkg ".pc"
@@ -2193,8 +2184,7 @@ function replace_pkgconfig(pkg, # parameters
# }}}
# {{{ replace_perlmod(pkg)
-function replace_perlmod(pkg, version, # parameters
- cmd, line) { # locals
+function replace_perlmod(pkg, version, cmd, line) {
# do nothing if version is specified
if (version) {
return
@@ -2215,8 +2205,7 @@ function replace_perlmod(pkg, version, # parameters
# }}}
# {{{ replace_pythonegg(pkg)
-function replace_pythonegg(pkg, # parameters
- cmd, line) { # locals
+function replace_pythonegg(pkg, cmd, line) {
cmd = "rpm -q --qf '%{N}' --whatprovides 'pythonegg(" pkg ")'"
# Getline returns 0 on end-of-file, -1 on error, otherwise 1.
if ((cmd | getline line) <= 0) {
@@ -2232,8 +2221,7 @@ function replace_pythonegg(pkg, # parameters
# }}}
# {{{ replace_requires
-function replace_requires(field, # parameters
- pkg) { # locals
+function replace_requires(field, pkg) {
# strip %{?_isa}
if ($2 ~ /_isa/) {
$2 = fixedsub("%{?_isa}", "", $2);
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/adapter.git/commitdiff/6ca0126d4d0c8c79feb7db10b0a0fade0f3b8885
More information about the pld-cvs-commit
mailing list