diff options
author | Simone Cimarelli | 2022-10-05 00:01:50 +0200 |
---|---|---|
committer | Simone Cimarelli | 2022-10-05 00:01:50 +0200 |
commit | 1cd22f9f7777d7033f913e0ee938bf332719e4a6 (patch) | |
tree | ae9a461da7f29a3f250f6ec0f9601e6ff22a5556 | |
parent | 57f79ece7841c2cc7ea7267750c5701872a3a690 (diff) | |
download | aur-1cd22f9f7777d7033f913e0ee938bf332719e4a6.tar.gz |
Attempt to remove references to $srcdir
-rw-r--r-- | PKGBUILD | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -61,9 +61,13 @@ EOF build() { cd "$_pkg" - CFLAGS="$(_update_march "$CFLAGS")" - CPPFLAGS="$(_update_march "$CPPFLAGS")" - CXXFLAGS="$(_update_march "$CXXFLAGS")" + CFLAGS="$(_update_march "$CFLAGS") -ffile-prefix-map=${srcdir}=." + CPPFLAGS="$(_update_march "$CPPFLAGS") -ffile-prefix-map=${srcdir}=." + CXXFLAGS="$(_update_march "$CXXFLAGS") -ffile-prefix-map=${srcdir}=." + + make cmake + local escaped="$(sed 's|[[.*^$\\\|]|\\&|g;s/\n/\\n/g' <<< "$srcdir")" + find build -type f -iname '*.h' -print0 | xargs -0 sed -zi "s|$escaped|$_pkg|g" make } |