summaryrefslogtreecommitdiff
path: root/dev-python/numpy/files/replace_cpuflags.awk
diff options
context:
space:
mode:
authorLiguros - Gitlab CI/CD [develop] <gitlab@liguros.net>2023-07-08 18:21:23 +0000
committerLiguros - Gitlab CI/CD [develop] <gitlab@liguros.net>2023-07-08 18:21:23 +0000
commite91dc61301fc980c9a6cd5825259d4c5a9233791 (patch)
tree066202342be1adbfd7450bc9032983803358289e /dev-python/numpy/files/replace_cpuflags.awk
parent69dc9c39fdc42c14b828946c43d0f8643492e11e (diff)
downloadbaldeagleos-repo-e91dc61301fc980c9a6cd5825259d4c5a9233791.tar.gz
baldeagleos-repo-e91dc61301fc980c9a6cd5825259d4c5a9233791.tar.xz
baldeagleos-repo-e91dc61301fc980c9a6cd5825259d4c5a9233791.zip
Adding metadata
Diffstat (limited to 'dev-python/numpy/files/replace_cpuflags.awk')
-rw-r--r--dev-python/numpy/files/replace_cpuflags.awk14
1 files changed, 14 insertions, 0 deletions
diff --git a/dev-python/numpy/files/replace_cpuflags.awk b/dev-python/numpy/files/replace_cpuflags.awk
new file mode 100644
index 000000000000..11b8bd53b2c3
--- /dev/null
+++ b/dev-python/numpy/files/replace_cpuflags.awk
@@ -0,0 +1,14 @@
+#!/usr/bin/awk -f
+
+{
+ GENTOO_ENABLE=1;
+ if (match($0, /flags="([^"=]*)"/, cflags)) {
+ split(cflags[1], fields);
+ for (i in fields) {
+ if (match(fields[i], /-m([[:graph:]]*)/, inst)) {
+ if (!index(enabled_flags, inst[1])) {
+ GENTOO_ENABLE=0;
+ }}}}
+ if (!GENTOO_ENABLE) { sub(cflags[1], "-mGENTOO_DISABLE"); }
+ print;
+}