[packages/adapter: 314/631] - allow macros in _libdir and _datadir definitions

glen glen at pld-linux.org
Mon Sep 12 20:00:46 CEST 2016


commit a27fac4da91563b8be0bf29875ce83b57ecab862
Author: Elan Ruusamäe <glen at pld-linux.org>
Date:   Thu May 4 19:10:14 2006 +0000

    - allow macros in _libdir and _datadir definitions
    
    Changed files:
        adapter.awk -> 1.302

 adapter.awk | 20 ++++++++++++++++----
 1 file changed, 16 insertions(+), 4 deletions(-)
---
diff --git a/adapter.awk b/adapter.awk
index bad9db9..3c42a41 100644
--- a/adapter.awk
+++ b/adapter.awk
@@ -189,8 +189,14 @@ function b_makekey(a, b,	s) {
 		bindir = $3
 	if ($2 ~ /_sbindir/)
 		sbindir = $3
-	if ($2 ~ /_libdir/)
-		libdir = $3
+	if ($2 ~ /_libdir/) {
+		if ($3 ~ /^%\(/) {
+			# TODO: should escape for latter checks like: ($c ~ sysconfdir "/{?cron.")
+			libdir = "%%%%%%%%%%%%%%"
+		} else {
+			libdir = $3
+		}
+	}
 	if ($2 ~ /_sysconfdir/) {
 		if ($3 ~ /^%\(/) {
 			# TODO: should escape for latter checks like: ($c ~ sysconfdir "/{?cron.")
@@ -199,8 +205,14 @@ function b_makekey(a, b,	s) {
 			sysconfdir = $3
 		}
 	}
-	if ($2 ~ /_datadir/)
-		datadir = $3
+	if ($2 ~ /_datadir/) {
+		if ($3 ~ /^%\(/) {
+			# TODO: should escape for latter checks like: ($c ~ sysconfdir "/{?cron.")
+			datadir = "%%%%%%%%%%%%%%"
+		} else {
+			datadir = $3
+		}
+	}
 	if ($2 ~ /_includedir/)
 		includedir = $3
 	if ($2 ~ /_mandir/)
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/adapter.git/commitdiff/6ca0126d4d0c8c79feb7db10b0a0fade0f3b8885



More information about the pld-cvs-commit mailing list