[packages/adapter: 246/631] - leave -I/usr/include alone - cvs up rpm.groups only when inexistent (less cvs traffic and rarely u

glen glen at pld-linux.org
Mon Sep 12 19:55:04 CEST 2016


commit 826b40ea9d2e147599b6c96b49282a5b7142879d
Author: Elan Ruusamäe <glen at pld-linux.org>
Date:   Tue Dec 13 14:37:10 2005 +0000

    - leave -I/usr/include alone
    - cvs up rpm.groups only when inexistent (less cvs traffic and rarely updated file)
    
    Changed files:
        adapter.awk -> 1.237

 adapter.awk | 19 +++++++++++++++----
 1 file changed, 15 insertions(+), 4 deletions(-)
---
diff --git a/adapter.awk b/adapter.awk
index 8d7fa1b..d5d4d2e 100644
--- a/adapter.awk
+++ b/adapter.awk
@@ -44,7 +44,7 @@ BEGIN {
 	# File with rpm groups
 	"rpm --eval %_sourcedir" | getline groups_file
 	groups_file = groups_file "/rpm.groups"
-	system("cd `rpm --eval %_sourcedir`; cvs up rpm.groups >/dev/null")
+	system("cd `rpm --eval %_sourcedir`; [ -f rpm.groups ] || cvs up rpm.groups >/dev/null")
 
 	# Temporary file for changelog section
 	changelog_file = ENVIRON["HOME"] "/tmp/adapter.changelog"
@@ -902,14 +902,20 @@ function use_macros()
 	if (prefix"/share" == datadir)
 		gsub("%{_prefix}/share", "%{_datadir}")
 
-	gsub(includedir, "%{_includedir}")
+	# CFLAGS="-I/usr/include/ncurses is usually correct.
+	if (!/-I\/usr\/include/) {
+		gsub(includedir, "%{_includedir}")
+	}
+
 	gsub("%{prefix}/include", "%{_includedir}")
-	if (prefix"/include" == includedir)
+	if (prefix"/include" == includedir) {
 		gsub("%{_prefix}/include", "%{_includedir}")
+	}
 
 	gsub(mandir, "%{_mandir}")
-	if ($0 !~ "%{_datadir}/manual")
+	if ($0 !~ "%{_datadir}/manual") {
 		gsub("%{_datadir}/man", "%{_mandir}")
+	}
 	gsub("%{_prefix}/share/man", "%{_mandir}")
 	gsub("%{prefix}/share/man", "%{_mandir}")
 	gsub("%{prefix}/man", "%{_mandir}")
@@ -945,6 +951,11 @@ function use_macros()
 					continue;
 				if ($c ~ prefix "/lib/pkgconfig")
 					continue;
+
+				# CFLAGS="-I/usr/include/ncurses is usually correct.
+				if (/-I\/usr\/include/)
+					continue;
+
 				gsub(prefix, "%{_prefix}", $c)
 			}
 		}
================================================================

---- gitweb:

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



More information about the pld-cvs-commit mailing list