commit a9fb2db8920f8f443080b42dcf251c3c0bff01eb
Author: Elan Ruusamäe <[email protected]>
Date:   Sun Oct 9 16:32:05 2005 +0000

    - don't touch %bcond lines
    - leave /usr/share/file/magic.mime alone
    - lave /usr/lib/sendmail intact
    - don't touch --with-foo=/usr lines
    
    Changed files:
        adapter.awk -> 1.194

 adapter.awk | 29 +++++++++++++++++++++--------
 1 file changed, 21 insertions(+), 8 deletions(-)
---
diff --git a/adapter.awk b/adapter.awk
index 51099eb..34039c8 100644
--- a/adapter.awk
+++ b/adapter.awk
@@ -112,6 +112,12 @@ ENVIRON["SORTBR"] == 1 && preamble == 1 && 
/(Build)?Requires/, /(Build)?Requires
        next;
 }
 
+/^%bcond_/ {
+       # do nothing
+       print
+       next
+}
+
 preamble == 1 {
        if (b_idx > 0) {
                isort(b_key, b_idx);
@@ -807,6 +813,8 @@ function use_macros()
                        continue;
                if ($c ~ datadir "/unsermake")
                        continue;
+               if ($c ~ datadir "/file/magic.mime")
+                       continue;
                gsub(datadir, "%{_datadir}", $c)
        }
 
@@ -840,14 +848,19 @@ function use_macros()
        gsub("/usr/lib/pkgconfig", "%{_libdir}/pkgconfig")
 
        if (prefix != "/") {
-               for (c = 1; c <= NF; c++) {
-                       if ($c ~ prefix "/sbin/fix-info-dir")
-                               continue;
-                       if ($c ~ prefix "/share/automake")
-                               continue;
-                       if ($c ~ prefix "/share/unsermake")
-                               continue;
-                       gsub(prefix, "%{_prefix}", $c)
+               # leave --with-foo=/usr alone
+               if ($0 !~ "--with.*=.*" prefix) {
+                       for (c = 1; c <= NF; c++) {
+                               if ($c ~ prefix "/sbin/fix-info-dir")
+                                       continue;
+                               if ($c ~ prefix "/share/automake")
+                                       continue;
+                               if ($c ~ prefix "/share/unsermake")
+                                       continue;
+                               if ($c ~ prefix "/lib/sendmail")
+                                       continue;
+                               gsub(prefix, "%{_prefix}", $c)
+                       }
                }
                gsub("%{prefix}", "%{_prefix}")
        }
================================================================

---- gitweb:

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

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to