[packages/adapter: 508/631] - pear macros migration
glen
glen at pld-linux.org
Mon Sep 12 20:17:01 CEST 2016
commit d6e33af74a674e8f83a9addbd1ef37f701837171
Author: Elan Ruusamäe <glen at pld-linux.org>
Date: Tue Dec 7 13:08:08 2010 +0000
- pear macros migration
Changed files:
adapter.awk -> 1.477
adapter.awk | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
---
diff --git a/adapter.awk b/adapter.awk
index 430cf17..30520ed 100644
--- a/adapter.awk
+++ b/adapter.awk
@@ -238,6 +238,20 @@ function b_makekey(a, b, s) {
mod_name = $3
if ($2 ~ /^_?pearname$/)
pearname = $3
+ if ($2 ~ /^_class$/)
+ pear_class = $3
+ if ($2 ~ /^_subclass$/)
+ pear_subclass = $3
+
+ # kill the _class and _subclass pear macros
+ if ($2 == "_pearname" || $2 == "pearname") {
+ if (pear_class) {
+ gsub("%{_class}", pear_class, $3);
+ }
+ if (pear_subclass) {
+ gsub("%{_subclass}", pear_subclass, $3);
+ }
+ }
sub(/[ \t]+$/, "");
# do nothing further, otherwise adapter thinks we're at preamble
@@ -1377,6 +1391,15 @@ function use_macros()
$0 = fixedsub("%(%{__cc} -dumpversion)", "%{cc_version}", $0);
$0 = fixedsub("%(%{__cxx} -dumpversion)", "%{cxx_version}", $0);
+
+ # kill the _class and _subclass pear macros
+ if (pear_class) {
+ gsub("%{_class}", pear_class);
+ }
+ if (pear_subclass) {
+ gsub("%{_subclass}", pear_subclass);
+ }
+
}
function format_configure(line, n, a, s) {
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/adapter.git/commitdiff/6ca0126d4d0c8c79feb7db10b0a0fade0f3b8885
More information about the pld-cvs-commit
mailing list