SOURCES: rpm.macros - %filterout_* support (in build-specyfic macr...
sparky
sparky at pld-linux.org
Sat Aug 5 20:34:28 CEST 2006
Author: sparky Date: Sat Aug 5 18:34:28 2006 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- %filterout_* support (in build-specyfic macros because of awk requeriment)
---- Files affected:
SOURCES:
rpm.macros (1.312 -> 1.313)
---- Diffs:
================================================================
Index: SOURCES/rpm.macros
diff -u SOURCES/rpm.macros:1.312 SOURCES/rpm.macros:1.313
--- SOURCES/rpm.macros:1.312 Sun Jul 23 22:46:11 2006
+++ SOURCES/rpm.macros Sat Aug 5 20:34:23 2006
@@ -51,6 +51,46 @@
# and that both p and q are package names (i.e. no version/release).
%_dependency_whiteout %{nil}
+
+#-----------------------------------------------------------------
+#
+# (re)definition of %{rpm*flags} with %filterout_* support
+# Requires: awk
+#
+# Flags specified in %filterout_* are removed from %rpm*flags, exactly:
+# %rpmcflags = %optflags - %filterout_c - %filterout_ld
+# %rpmcxxflags = %rpmcflags - %filterout_cxx
+# %rpmldflags = %optldflags - %filterout_ld
+#
+# Regular expressions are supported, but to avoid some character be treated
+# as regular expression it must be escaped twice.
+
+%filter_out \
+ for (i in I) { A=0; \
+ for (f in F) { \
+ if (I[i] ~ "^" F[f] "$") A=1; \
+ }; \
+ if (!A) printf(I[i] FS); \
+ }
+
+%rpmcflags %(awk 'BEGIN {
+ split("%{?debug:%debugcflags}%{!?debug:%optflags}%{?debuginfocflags}",I);
+ split("%{?filterout_c} %{?filterout_ld}",F);
+ %{filter_out}
+}')
+
+%rpmcxxflags %(awk 'BEGIN {
+ split("%{rpmcflags}",I);
+ split("%{?filterout_cxx}",F);
+ %{filter_out}
+}')
+
+%rpmldflags %(awk 'BEGIN {
+ split("%{optldflags}",I);
+ split("%{?filterout_ld}",F)
+ %{filter_out}
+}')
+
#-----------------------------------------------------------------
%configure2_13 { \
if [ -n "$LINGUAS" ]; then unset LINGUAS; fi; \
================================================================
---- CVS-web:
http://cvs.pld-linux.org/SOURCES/rpm.macros?r1=1.312&r2=1.313&f=u
More information about the pld-cvs-commit
mailing list